Rev 4: Correct the length when pushing a new branch in http://bzr.arbash-meinel.com/plugins/push_and_update

John Arbash Meinel john at arbash-meinel.com
Mon Feb 12 22:45:16 GMT 2007


At http://bzr.arbash-meinel.com/plugins/push_and_update

------------------------------------------------------------
revno: 4
revision-id: john at arbash-meinel.com-20070212224515-ippodn22riasf511
parent: john at arbash-meinel.com-20070212222100-1wbs77fjibz2roee
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: push_and_update
timestamp: Mon 2007-02-12 16:45:15 -0600
message:
  Correct the length when pushing a new branch
modified:
  push_and_update.py             push_and_update.py-20070212212941-xifrmnv3jrbcv28z-2
-------------- next part --------------
=== modified file 'push_and_update.py'
--- a/push_and_update.py	2007-02-12 22:21:00 +0000
+++ b/push_and_update.py	2007-02-12 22:45:15 +0000
@@ -80,7 +80,8 @@
         return 0, 0
     last_rev = a_branch.last_revision()
     anc = a_branch.repository.get_ancestry(last_rev)
-    return starting_revno, len(anc)
+    # anc always includes 'None'
+    return starting_revno, len(anc)-1
 
 
 def _push_revisions(local_branch, target_branch):



More information about the bazaar-commits mailing list