mercurial/cmdutil.py
changeset 15636 4841035f37b6
parent 15603 36d7a0c7505f
parent 15634 cfc15cbecc5e
child 15700 1facaad963a8
equal deleted inserted replaced
15632:c9913ef748f7 15636:4841035f37b6
   586 
   586 
   587     if listsubrepos:
   587     if listsubrepos:
   588         ctx1 = repo[node1]
   588         ctx1 = repo[node1]
   589         ctx2 = repo[node2]
   589         ctx2 = repo[node2]
   590         for subpath, sub in subrepo.itersubrepos(ctx1, ctx2):
   590         for subpath, sub in subrepo.itersubrepos(ctx1, ctx2):
   591             if node2 is not None:
   591             try:
   592                 node2 = ctx2.substate[subpath][1]
   592                 if node2 is not None:
       
   593                     node2 = ctx2.substate[subpath][1]
       
   594             except KeyError:
       
   595                 # A subrepo that existed in node1 was deleted between node1 and
       
   596                 # node2 (inclusive). Thus, ctx2's substate won't contain that
       
   597                 # subpath. The best we can do is to ignore it.
       
   598                 node2 = None
   593             submatch = matchmod.narrowmatcher(subpath, match)
   599             submatch = matchmod.narrowmatcher(subpath, match)
   594             sub.diff(diffopts, node2, submatch, changes=changes,
   600             sub.diff(diffopts, node2, submatch, changes=changes,
   595                      stat=stat, fp=fp, prefix=prefix)
   601                      stat=stat, fp=fp, prefix=prefix)
   596 
   602 
   597 class changeset_printer(object):
   603 class changeset_printer(object):