~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-09 21:08:10 UTC
  • mfrom: (3989.1.2 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090209210810-cq9lgqy519b7wfyi
(oddbloke) bzr add distinguishes between success and failure better.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        results = sorted(out.rstrip('\n').split('\n'))
36
36
        self.assertEquals(['If you wish to add some of these files, please'\
37
37
                           ' add them by name.',
38
 
                           'added .bzrignore',
39
 
                           'added dir',
40
 
                           'added dir/sub.txt',
41
 
                           'added top.txt',
 
38
                           'add completed',
 
39
                           'adding .bzrignore',
 
40
                           'adding dir',
 
41
                           'adding dir/sub.txt',
 
42
                           'adding top.txt',
42
43
                           'ignored 1 file(s).'],
43
44
                          results)
44
45
        out = self.run_bzr('add -v')[0]
146
147
        os.chdir('new')
147
148
        out, err = self.run_bzr('add --file-ids-from ../base')
148
149
        self.assertEqual('', err)
149
 
        self.assertEqualDiff('added a w/ file id from a\n'
150
 
                             'added b w/ file id from b\n'
151
 
                             'added b/c w/ file id from b/c\n',
 
150
        self.assertEqualDiff('adding a w/ file id from a\n'
 
151
                             'adding b w/ file id from b\n'
 
152
                             'adding b/c w/ file id from b/c\n'
 
153
                             'add completed\n',
152
154
                             out)
153
155
        new_tree = new_tree.bzrdir.open_workingtree()
154
156
        self.assertEqual(base_tree.path2id('a'), new_tree.path2id('a'))
167
169
        os.chdir('new')
168
170
        out, err = self.run_bzr('add --file-ids-from ../base/b')
169
171
        self.assertEqual('', err)
170
 
        self.assertEqualDiff('added c w/ file id from b/c\n'
171
 
                             'added d w/ file id from b/d\n',
 
172
        self.assertEqualDiff('adding c w/ file id from b/c\n'
 
173
                             'adding d w/ file id from b/d\n'
 
174
                             'add completed\n',
172
175
                             out)
173
176
 
174
177
        new_tree = new_tree.bzrdir.open_workingtree()