changeset 400:09625f3abdb0

branches: simplify branch deletion a little bit
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 10 Jun 2009 09:51:33 +0200
parents 94f7e8c53c36
children 9e87f7047bf1
files hgsubversion/hg_delta_editor.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/hg_delta_editor.py
+++ b/hgsubversion/hg_delta_editor.py
@@ -731,12 +731,10 @@ class HgChangeReceiver(delta.Editor):
             self.committags(tbdelta['tags'], rev, closebranches)
 
         # 4. close any branches that need it
-        for branch in tbdelta['branches'][1]:
-            # self.get_parent_revision(rev.revnum, branch)
-            ha = closebranches.get(branch)
-            if ha is None:
+        for branch, parent in closebranches.iteritems():
+            if parent is None:
                 continue
-            self.delbranch(branch, ha, rev)
+            self.delbranch(branch, parent, rev)
 
         self._save_metadata()
         self.clear_current_info()