~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Lukáš Lalinsky
  • Date: 2007-08-23 19:41:35 UTC
  • mto: This revision was merged to the branch mainline in revision 2776.
  • Revision ID: lalinsky@gmail.com-20070823194135-sd784wf9vhbuplv2
New option -C/--change for diff and status to show changes in one revision. (#56299)

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        self.run_bzr('commit -m fixing hello')
57
57
        output = self.run_bzr('diff -r 2..3', retcode=1)[0]
58
58
        self.assert_('\n+hello world!' in output)
59
 
        output = self.run_bzr('diff -r last:3..last:1',
60
 
                retcode=1)[0]
 
59
        output = self.run_bzr('diff -C 3', retcode=1)[0]
 
60
        self.assert_('\n+hello world!' in output)
 
61
        output = self.run_bzr('diff -r last:3..last:1', retcode=1)[0]
 
62
        self.assert_('\n+baz' in output)
 
63
        output = self.run_bzr('diff -C last:2', retcode=1)[0]
61
64
        self.assert_('\n+baz' in output)
62
65
        self.build_tree(['moo'])
63
66
        self.run_bzr('add moo')
129
132
        out, err = self.run_bzr('diff -r 1..23..123', retcode=3)
130
133
        self.assertContainsRe(err, 'one or two revision specifiers')
131
134
 
 
135
    def test_diff_revision_and_change(self):
 
136
        out, err = self.run_bzr('diff -r 1..23 -C 22', retcode=3)
 
137
        self.assertContainsRe(err, '--revision or --change, not both')
 
138
 
132
139
    def test_diff_unversioned(self):
133
140
        # Get an error when diffing a non-versioned file.
134
141
        # (Malone #3619)