Rev 177: Handle no-merge-base errors. in http://bzr.daniel-watkins.co.uk/pqm/116656

Daniel Watkins daniel at daniel-watkins.co.uk
Tue Jul 15 11:47:38 BST 2008


At http://bzr.daniel-watkins.co.uk/pqm/116656

------------------------------------------------------------
revno: 177
revision-id: daniel at daniel-watkins.co.uk-20080715104619-p4kuqqcfyfnflldr
parent: robertc at robertcollins.net-20080710074340-dl0w25nbutl88sz2
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: 116656
timestamp: Tue 2008-07-15 11:46:19 +0100
message:
  Handle no-merge-base errors.
-------------- next part --------------
=== modified file 'pqm/__init__.py'
--- a/pqm/__init__.py	2007-11-29 21:40:54 +0000
+++ b/pqm/__init__.py	2008-07-15 10:46:19 +0000
@@ -1414,11 +1414,17 @@
                 raise PQMTlaFailure(sender, [str(e).split('\n')])
 
     def do_star_merge(self, sender, from_branch, local_dir):
+        import bzrlib.errors
         from bzrlib.workingtree import WorkingTree
         tree = WorkingTree.open(local_dir)
         tree.lock_write()
         try:
-            return self._do_star_merge(sender, from_branch, local_dir, tree)
+            try:
+                return self._do_star_merge(sender, from_branch, local_dir, tree)
+            except bzrlib.errors.UnrelatedBranches:
+                raise PQMTlaFailure(sender,
+                    ['Branches have no common ancestor, and no merge base'
+                     ' revision was specified.'])
         finally:
             tree.unlock()
 



More information about the bazaar-commits mailing list