Mercurial > public > mercurial-scm > hg
diff mercurial/subrepo.py @ 20392:d4f804caa0ed
itersubrepos: move to scmutil to break a direct import cycle
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 03 Feb 2014 18:36:00 -0500 |
parents | 427d672c0e4e |
children | 49f2d5644f04 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Fri Feb 07 02:59:46 2014 +0100 +++ b/mercurial/subrepo.py Mon Feb 03 18:36:00 2014 -0500 @@ -326,16 +326,6 @@ os.unlink(os.path.join(dirname, f)) os.walk(path, v, None) -def itersubrepos(ctx1, ctx2): - """find subrepos in ctx1 or ctx2""" - # Create a (subpath, ctx) mapping where we prefer subpaths from - # ctx1. The subpaths from ctx2 are important when the .hgsub file - # has been modified (in ctx2) but not yet committed (in ctx1). - subpaths = dict.fromkeys(ctx2.substate, ctx2) - subpaths.update(dict.fromkeys(ctx1.substate, ctx1)) - for subpath, ctx in sorted(subpaths.iteritems()): - yield subpath, ctx.sub(subpath) - def subrepo(ctx, path): """return instance of the right subrepo class for subrepo in path""" # subrepo inherently violates our import layering rules