##// END OF EJS Templates
extdiff: correctly handle deleted subrepositories (issue3153)...
Andrew Zwicky -
r27183:0945539a default
parent child Browse files
Show More
@@ -336,17 +336,19 b' class basectx(object):'
336
336
337 if listsubrepos:
337 if listsubrepos:
338 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):
338 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):
339 try:
339 rev2 = ctx2.subrev(subpath)
340 rev2 = ctx2.subrev(subpath)
340 try:
341 except KeyError:
342 # A subrepo that existed in node1 was deleted between
343 # node1 and node2 (inclusive). Thus, ctx2's substate
344 # won't contain that subpath. The best we can do ignore it.
345 rev2 = None
341 submatch = matchmod.narrowmatcher(subpath, match)
346 submatch = matchmod.narrowmatcher(subpath, match)
342 s = sub.status(rev2, match=submatch, ignored=listignored,
347 s = sub.status(rev2, match=submatch, ignored=listignored,
343 clean=listclean, unknown=listunknown,
348 clean=listclean, unknown=listunknown,
344 listsubrepos=True)
349 listsubrepos=True)
345 for rfiles, sfiles in zip(r, s):
350 for rfiles, sfiles in zip(r, s):
346 rfiles.extend("%s/%s" % (subpath, f) for f in sfiles)
351 rfiles.extend("%s/%s" % (subpath, f) for f in sfiles)
347 except error.LookupError:
348 self._repo.ui.status(_("skipping missing "
349 "subrepository: %s\n") % subpath)
350
352
351 for l in r:
353 for l in r:
352 l.sort()
354 l.sort()
@@ -126,6 +126,25 b' Check diff are made from the first paren'
126 diff-like tools yield a non-zero exit code
126 diff-like tools yield a non-zero exit code
127 #endif
127 #endif
128
128
129 issue3153: ensure using extdiff with removed subrepos doesn't crash:
130
131 $ hg init suba
132 $ cd suba
133 $ echo suba > suba
134 $ hg add
135 adding suba
136 $ hg ci -m "adding suba file"
137 $ cd ..
138 $ echo suba=suba > .hgsub
139 $ hg add
140 adding .hgsub
141 $ hg ci -Sm "adding subrepo"
142 $ echo > .hgsub
143 $ hg ci -m "removing subrepo"
144 $ hg falabala -r 4 -r 5 -S
145 diffing a.398e36faf9c6 a.5ab95fb166c4
146 [1]
147
129 issue4463: usage of command line configuration without additional quoting
148 issue4463: usage of command line configuration without additional quoting
130
149
131 $ cat <<EOF >> $HGRCPATH
150 $ cat <<EOF >> $HGRCPATH
General Comments 0
You need to be logged in to leave comments. Login now