Rev 2326: [merge] Dmitry's updates to cmd_diff in http://bzr.arbash-meinel.com/branches/bzr/jam-integration

John Arbash Meinel john at arbash-meinel.com
Thu Mar 8 17:41:00 GMT 2007


At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 2326
revision-id: john at arbash-meinel.com-20070308174053-y1r0glqavi8iulez
parent: pqm at pqm.ubuntu.com-20070307233124-ad2724bf65e09035
parent: dima at hlabs.spb.ru-20070308094114-hqx0n9cu1w6z34ax
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Thu 2007-03-08 11:40:53 -0600
message:
  [merge] Dmitry's updates to cmd_diff
modified:
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/tests/blackbox/test_diff.py test_diff.py-20060110203741-aa99ac93e633d971
    ------------------------------------------------------------
    revno: 2324.1.2
    merged: dima at hlabs.spb.ru-20070308094114-hqx0n9cu1w6z34ax
    parent: dima at hlabs.spb.ru-20070308061932-iyxo5y77cabdfgtj
    committer: Dmitry Vasiliev <dima at hlabs.spb.ru>
    branch nick: Small fixes
    timestamp: Thu 2007-03-08 12:41:14 +0300
    message:
      Added test for bzr diff --prefix illegal_value
    ------------------------------------------------------------
    revno: 2324.1.1
    merged: dima at hlabs.spb.ru-20070308061932-iyxo5y77cabdfgtj
    parent: pqm at pqm.ubuntu.com-20070307121852-b60a661123a5063d
    committer: Dmitry Vasiliev <dima at hlabs.spb.ru>
    branch nick: Small fixes
    timestamp: Thu 2007-03-08 09:19:32 +0300
    message:
      Small fixes for bzr diff
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2007-03-07 23:15:10 +0000
+++ b/bzrlib/builtins.py	2007-03-08 17:40:53 +0000
@@ -1336,7 +1336,7 @@
             Difference between the working tree and revision 1
         bzr diff -r1..2
             Difference between revision 2 and revision 1
-        bzr diff --diff-prefix old/:new/
+        bzr diff --prefix old/:new/
             Same as 'bzr diff' but prefix paths with old/ and new/
         bzr diff bzr.mine bzr.dev
             Show the differences between the two working trees
@@ -1379,7 +1379,7 @@
         elif ':' in prefix:
             old_label, new_label = prefix.split(":")
         else:
-            raise BzrCommandError(
+            raise errors.BzrCommandError(
                 "--prefix expects two values separated by a colon")
 
         if revision and len(revision) > 2:

=== modified file 'bzrlib/tests/blackbox/test_diff.py'
--- a/bzrlib/tests/blackbox/test_diff.py	2006-12-21 03:59:43 +0000
+++ b/bzrlib/tests/blackbox/test_diff.py	2007-03-08 09:41:14 +0000
@@ -79,6 +79,12 @@
 
 ''')
 
+    def test_diff_illegal_prefix_value(self):
+        # There was an error in error reporting for this option
+        out, err = self.runbzr('diff --prefix old/', retcode=3)
+        self.assertContainsRe(err,
+            '--prefix expects two values separated by a colon')
+
     def test_diff_p1(self):
         """diff -p1 produces lkml-style diffs"""
         self.make_example_branch()



More information about the bazaar-commits mailing list