# HG changeset patch # User Siddharth Agarwal # Date 1392266049 28800 # Node ID 3ceacdd23abea622ea9903ce0dc0946d1c413aeb # Parent ab2be1d994e6277ac7bd4f871ae8dbe46812094c hg2git: add 'new' prefix to _handle_subrepos variables An upcoming patch will introduce similar variables for self._ctx. This helps disambiguate. diff --git a/hggit/hg2git.py b/hggit/hg2git.py --- 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)