comparison mercurial/copies.py @ 44210:d0c3eead515a

copies: fix crash when copy source is not in graft base Differential Revision: https://phab.mercurial-scm.org/D8046
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 29 Jan 2020 23:14:31 -0800
parents fa9ad1da2e77
children b4057d001760
comparison
equal deleted inserted replaced
44209:ae4d729eb3c8 44210:d0c3eead515a
525 if src not in m2: 525 if src not in m2:
526 # deleted on side 2 526 # deleted on side 2
527 if src not in m1: 527 if src not in m1:
528 # renamed on side 1, deleted on side 2 528 # renamed on side 1, deleted on side 2
529 renamedelete[src] = dsts1 529 renamedelete[src] = dsts1
530 elif src not in mb:
531 # Work around the "short-circuit to avoid issues with merge states"
532 # thing in pathcopies(): pathcopies(x, y) can return a copy where the
533 # destination doesn't exist in y.
534 pass
530 elif m2[src] != mb[src]: 535 elif m2[src] != mb[src]:
531 if not _related(c2[src], base[src]): 536 if not _related(c2[src], base[src]):
532 return 537 return
533 # modified on side 2 538 # modified on side 2
534 for dst in dsts1: 539 for dst in dsts1: