~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2010-11-04 17:48:47 UTC
  • mto: This revision was merged to the branch mainline in revision 5523.
  • Revision ID: v.ladeuil+lp@free.fr-20101104174847-x3io00xsknnikaka
Handle --directory when paths are also provided to shelve and restore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        self.assertEqual('', err)
42
42
        self.assertEqual('  1: Foo\n', out)
43
43
 
 
44
    def test_shelve_list_via_directory(self):
 
45
        tree = self.make_branch_and_tree('tree')
 
46
        creator = self.make_creator(tree)
 
47
        shelf_id = tree.get_shelf_manager().shelve_changes(creator, 'Foo')
 
48
        out, err = self.run_bzr('shelve -d tree --list', retcode=1)
 
49
        self.assertEqual('', err)
 
50
        self.assertEqual('  1: Foo\n', out)
 
51
 
44
52
    def test_shelve_no_message(self):
45
53
        tree = self.make_branch_and_tree('.')
46
54
        creator = self.make_creator(tree)
125
133
        os.chdir('tree/dir')
126
134
        self.run_bzr('shelve --all ../file')
127
135
 
 
136
    def test_shelve_via_directory(self):
 
137
        tree = self.make_branch_and_tree('tree')
 
138
        self.build_tree(['tree/file', 'tree/dir/'])
 
139
        tree.add('file')
 
140
        self.run_bzr('shelve -d tree/dir --all ../file')
 
141
 
128
142
 
129
143
class TestShelveUnshelve(TestCaseWithTransport):
130
144