Changeset 697fd2f42a54…
Parent a99542763aae…
by
Changes to 2 files · Browse files at 697fd2f42a54 Showing diff from parent a99542763aae Diff from another changeset...
@@ -34,6 +34,12 @@ except ImportError:
# hg <= 1.8
from mercurial.url import hidepassword
+try:
+ # hg >= 1.9
+ from mercurial.util import removeauth
+except ImportError:
+ # hg <= 1.8
+ from mercurial.url import removeauth
demandimport.enable()
_encoding = encoding.encoding
@@ -610,10 +616,10 @@def getDeepestSubrepoContainingFile(wfile, ctx):
"""
Given a filename and context, get the deepest subrepo that contains the file
-
+
Also return the corresponding subrepo context and the filename relative to
its containing subrepo
- """
+ """
if wfile in ctx.manifest():
return '', wfile, ctx
for wsub in ctx.substate:
@@ -629,7 +635,7 @@ sctx = ctx.sub(wsub)._repo[srev]
except:
# The selected revision does not exist in the working copy
- continue
+ continue
wfileinsub = wfile[len(wsub)+1:]
if wfileinsub in sctx.substate or wfileinsub in sctx.manifest():
return wsub, wfileinsub, sctx
|
Loading...