test scripts don't support unshelve

Bug #856261 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Vincent Ladeuil

Bug Description

While investigating bug #850594 I tried writing the corresponding test-script:

$ bzr init .
$ mkdir dir/
$ echo "this line represents editing" >> dir/file
$ bzr add
$ bzr shelve -m "work on file" dir/file
# Shelve adding file "dir/file"? [yNfq?] y
# Shelve adding file "dir"? [yNfq?] n
# Selected changes:
# -D dir/file
# Shelve 1 change(s)? [yNfq?] y
<yny
$ bzr ci -m "setup dir"
$ bzr unshelve

Trying it with './bzr test-script --null-output bug.script' fails with:

FAIL: bzrlib.cmd_test_script.Test.test_it
    log: {{{
0.131 creating repository in file:///tmp/testbzr-sds4kh.tmp/.bzr/.
0.134 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x2233990> in file:///tmp/testbzr-sds4kh.tmp/
0.141 trying to create missing lock '/tmp/testbzr-sds4kh.tmp/.bzr/checkout/dirstate'
0.142 opening working tree '/tmp/testbzr-sds4kh.tmp'
0.149 run bzr: ['init', '.']
0.149 bazaar version: 2.5.0dev2
0.149 bzr arguments: [u'init', u'.']
0.151 encoding stdout as sys.stdout encoding 'UTF-8'
0.154 creating repository in file:///tmp/testbzr-sds4kh.tmp/bzrlib.cmd_test_script.Test.test_it/work/.bzr/.
0.157 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x2c9a7d0> in file:///tmp/testbzr-sds4kh.tmp/bzrlib.cmd_test_script.Test.test_it/work/
0.161 trying to create missing lock '/tmp/testbzr-sds4kh.tmp/bzrlib.cmd_test_script.Test.test_it/work/.bzr/checkout/dirstate'
0.161 opening working tree '/tmp/testbzr-sds4kh.tmp/bzrlib.cmd_test_script.Test.test_it/work'
0.166 opening working tree '/tmp/testbzr-sds4kh.tmp/bzrlib.cmd_test_script.Test.test_it/work'
0.181 output:
'Created a standalone tree (format: 2a)\n'
0.181 run bzr: ['add']
0.181 bazaar version: 2.5.0dev2
0.181 bzr arguments: [u'add']
0.183 encoding stdout as sys.stdout encoding 'UTF-8'
0.185 opening working tree '/tmp/testbzr-sds4kh.tmp/bzrlib.cmd_test_script.Test.test_it/work'
0.189 skip control directory '.bzr'
0.190 creating config directory: '/tmp/testbzr-sds4kh.tmp/bzrlib.cmd_test_script.Test.test_it/home/.bazaar'
0.194 output:
'adding dir\nadding dir/file\n'
0.195 run bzr: ['shelve', '-m', 'work on file', 'dir/file']
0.195 bazaar version: 2.5.0dev2
0.195 bzr arguments: [u'shelve', u'-m', u'work on file', u'dir/file']
0.196 encoding stdout as sys.stdout encoding 'UTF-8'
0.199 opening working tree '/tmp/testbzr-sds4kh.tmp/bzrlib.cmd_test_script.Test.test_it/work'
0.204 Traceback (most recent call last):
  File "/home/vila/src/bzr/trunk/bzrlib/commands.py", line 1230, in run_bzr_catch_user_errors
    return run_bzr(argv)
  File "/home/vila/src/bzr/trunk/bzrlib/commands.py", line 1123, in run_bzr
    ret = run(*run_argv)
  File "/home/vila/src/bzr/trunk/bzrlib/commands.py", line 677, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/vila/src/bzr/trunk/bzrlib/commands.py", line 699, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/home/vila/src/bzr/trunk/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/vila/src/bzr/trunk/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/vila/src/bzr/trunk/bzrlib/builtins.py", line 6254, in run
    shelver.run()
  File "/home/vila/src/bzr/trunk/bzrlib/shelf_ui.py", line 205, in run
    if self.prompt_bool(self.reporter.prompt_change(change)):
  File "/home/vila/src/bzr/trunk/bzrlib/shelf_ui.py", line 291, in prompt_bool
    char = self.prompt(question + prompt)
  File "/home/vila/src/bzr/trunk/bzrlib/shelf_ui.py", line 265, in prompt
    raise errors.BzrError(gettext("You need a controlling terminal."))
BzrError: You need a controlling terminal.

0.204 errors:
'bzr: ERROR: You need a controlling terminal.\n'
}}}

Tags: shelf test

Related branches

Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.5b2
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.