changeset 648:3ceacdd23abe

hg2git: add 'new' prefix to _handle_subrepos variables An upcoming patch will introduce similar variables for self._ctx. This helps disambiguate.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 12 Feb 2014 20:34:09 -0800
parents ab2be1d994e6
children bd63cdfbc1de
files hggit/hg2git.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/hg2git.py
+++ b/hggit/hg2git.py
@@ -261,7 +261,7 @@
             # trees, this should hold true.
             parent_tree[os.path.basename(d)] = (stat.S_IFDIR, tree.id)
 
-    def _handle_subrepos(self, ctx, dirty_trees):
+    def _handle_subrepos(self, newctx, dirty_trees):
         def parse_subrepos(ctx):
             sub = util.OrderedDict()
             if '.hgsub' in ctx:
@@ -272,11 +272,11 @@
                     ctx['.hgsubstate'].data().splitlines())
             return sub, substate
 
-        sub, substate = parse_subrepos(ctx)
+        newsub, newsubstate = parse_subrepos(newctx)
 
-        for path, sha in substate.iteritems():
+        for path, sha in newsubstate.iteritems():
             # Ignore non-Git repositories keeping state in .hgsubstate.
-            if path in sub and not sub[path].startswith('[git]'):
+            if path in newsub and not newsub[path].startswith('[git]'):
                 continue
 
             d = os.path.dirname(path)