~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_shelve.py

  • Committer: Martin Pool
  • Date: 2009-12-11 05:48:21 UTC
  • mto: This revision was merged to the branch mainline in revision 4892.
  • Revision ID: mbp@sourcefrog.net-20091211054821-wolkr2xhx5xt37je
New option unshelve --keep

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        self.assertIs(None, tree.get_shelf_manager().last_shelf())
69
69
 
70
70
    def test_unshelve_keep(self):
71
 
        tree = self.make_branch_and_tree('tree')
72
 
        creator = self.make_creator(tree)
73
 
        tree.get_shelf_manager().shelve_changes(creator, 'Foo')
 
71
        # https://bugs.edge.launchpad.net/bzr/+bug/492091
 
72
        tree = self.make_branch_and_tree('.')
 
73
        # shelve apparently unhappy working with a tree with no root yet
 
74
        tree.commit('make root')
 
75
        self.build_tree(['file'])
74
76
 
75
77
        sr = ScriptRunner()
76
78
        sr.run_script(self, '''
77
 
$ bzr unshelve --keep''')
 
79
$ bzr add file
 
80
$ bzr shelve --all -m Foo
 
81
$ bzr shelve --list
 
82
  1: Foo
 
83
$ bzr unshelve --keep
 
84
$ bzr shelve --list
 
85
  1: Foo
 
86
$ cat file
 
87
contents of file
 
88
''')
 
89
 
78
90
 
79
91
 
80
92
class TestShelveRelpath(TestCaseWithTransport):