Rev 4371: (Jelmer) Make dpush help/error a bit more generic. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sun May 17 17:10:30 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4371
revision-id: pqm at pqm.ubuntu.com-20090517161026-97fgnk254qwvj4wf
parent: pqm at pqm.ubuntu.com-20090516091716-x8ozyp5uuvsgmsfg
parent: jelmer at samba.org-20090517145753-c4m8k397xxp5sw77
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sun 2009-05-17 17:10:26 +0100
message:
  (Jelmer) Make dpush help/error a bit more generic.
modified:
  bzrlib/foreign.py              foreign.py-20081112170002-olsxmandkk8qyfuq-1
  bzrlib/tests/blackbox/test_dpush.py test_dpush.py-20090108125928-st1td6le59g0vyv2-1
    ------------------------------------------------------------
    revno: 4368.2.2
    revision-id: jelmer at samba.org-20090517145753-c4m8k397xxp5sw77
    parent: jelmer at samba.org-20090516042926-d80fgap9pydf5js3
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: dpush-same-vcs
    timestamp: Sun 2009-05-17 16:57:53 +0200
    message:
      s/not possible/not necessary/.
    modified:
      bzrlib/foreign.py              foreign.py-20081112170002-olsxmandkk8qyfuq-1
      bzrlib/tests/blackbox/test_dpush.py test_dpush.py-20090108125928-st1td6le59g0vyv2-1
    ------------------------------------------------------------
    revno: 4368.2.1
    revision-id: jelmer at samba.org-20090516042926-d80fgap9pydf5js3
    parent: pqm at pqm.ubuntu.com-20090515012140-stwx16f974x0zogp
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: dpush-same-vcs
    timestamp: Sat 2009-05-16 06:29:26 +0200
    message:
      make dpush help and output reflect that dpush is not possible between branches 
      of the same VCS, not necessarily Bazaar.
    modified:
      bzrlib/foreign.py              foreign.py-20081112170002-olsxmandkk8qyfuq-1
=== modified file 'bzrlib/foreign.py'
--- a/bzrlib/foreign.py	2009-05-16 08:21:11 +0000
+++ b/bzrlib/foreign.py	2009-05-17 16:10:26 +0000
@@ -282,9 +282,9 @@
 
 
 class cmd_dpush(Command):
-    """Push into a foreign VCS without any custom bzr metadata.
+    """Push into a different VCS without any custom bzr metadata.
 
-    This will afterwards rebase the local Bazaar branch on the remote
+    This will afterwards rebase the local branch on the remote
     branch unless the --no-rebase option is used, in which case 
     the two branches will be out of sync after the push. 
     """
@@ -331,8 +331,9 @@
             try:
                 revid_map = source_branch.lossy_push(target_branch)
             except errors.LossyPushToSameVCS:
-                raise BzrCommandError("%r is not a foreign branch, use regular "
-                                      "push." % target_branch)
+                raise BzrCommandError("%r and %r are in the same VCS, lossy "
+                    "push not necessary. Please use regular push." %
+                    (source_branch, target_branch))
             # We successfully created the target, remember it
             if source_branch.get_push_location() is None or remember:
                 source_branch.set_push_location(target_branch.base)

=== modified file 'bzrlib/tests/blackbox/test_dpush.py'
--- a/bzrlib/tests/blackbox/test_dpush.py	2009-05-16 08:21:11 +0000
+++ b/bzrlib/tests/blackbox/test_dpush.py	2009-05-17 16:10:26 +0000
@@ -71,7 +71,7 @@
         source_tree = self.make_branch_and_tree("dc")
         output, error = self.run_bzr("dpush -d dc dp", retcode=3)
         self.assertEquals("", output)
-        self.assertContainsRe(error, 'not a foreign branch, use regular push')
+        self.assertContainsRe(error, 'in the same VCS, lossy push not necessary. Please use regular push.')
 
     def test_dpush(self):
         branch = self.make_dummy_builder('d').get_branch()




More information about the bazaar-commits mailing list