Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 15636:4841035f37b6
merge with stable
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 15 Dec 2011 16:26:33 +0100 |
parents | 36d7a0c7505f cfc15cbecc5e |
children | 1facaad963a8 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Dec 10 18:40:05 2011 +0100 +++ b/mercurial/cmdutil.py Thu Dec 15 16:26:33 2011 +0100 @@ -588,8 +588,14 @@ ctx1 = repo[node1] ctx2 = repo[node2] for subpath, sub in subrepo.itersubrepos(ctx1, ctx2): - if node2 is not None: - node2 = ctx2.substate[subpath][1] + try: + if node2 is not None: + node2 = ctx2.substate[subpath][1] + except KeyError: + # A subrepo that existed in node1 was deleted between node1 and + # node2 (inclusive). Thus, ctx2's substate won't contain that + # subpath. The best we can do is to ignore it. + node2 = None submatch = matchmod.narrowmatcher(subpath, match) sub.diff(diffopts, node2, submatch, changes=changes, stat=stat, fp=fp, prefix=prefix)