##// END OF EJS Templates
copies: improve assertions during copy recombination...
Gábor Stefanik -
r30208:87a7c0d4 default
parent child Browse files
Show More
@@ -447,6 +447,7 b' def mergecopies(repo, c1, c2, base):'
447 % "\n ".join(bothnew))
447 % "\n ".join(bothnew))
448 bothdiverge = {}
448 bothdiverge = {}
449 bothincompletediverge = {}
449 bothincompletediverge = {}
450 remainder = {}
450 both1 = {'copy': {},
451 both1 = {'copy': {},
451 'fullcopy': {},
452 'fullcopy': {},
452 'incomplete': {},
453 'incomplete': {},
@@ -463,13 +464,19 b' def mergecopies(repo, c1, c2, base):'
463 _checkcopies(c1, f, m1, m2, base, tca, dirtyc1, limit, both1)
464 _checkcopies(c1, f, m1, m2, base, tca, dirtyc1, limit, both1)
464 _checkcopies(c2, f, m2, m1, base, tca, dirtyc2, limit, both2)
465 _checkcopies(c2, f, m2, m1, base, tca, dirtyc2, limit, both2)
465 if dirtyc1:
466 if dirtyc1:
466 assert both2['incomplete'] == {}
467 # incomplete copies may only be found on the "dirty" side for bothnew
468 assert not both2['incomplete']
467 remainder = _combinecopies({}, both1['incomplete'], copy, bothdiverge,
469 remainder = _combinecopies({}, both1['incomplete'], copy, bothdiverge,
468 bothincompletediverge)
470 bothincompletediverge)
471 elif dirtyc2:
472 assert not both1['incomplete']
473 remainder = _combinecopies({}, both2['incomplete'], copy, bothdiverge,
474 bothincompletediverge)
469 else:
475 else:
470 assert both1['incomplete'] == {}
476 # incomplete copies and divergences can't happen outside grafts
471 remainder = _combinecopies({}, both2['incomplete'], copy, bothdiverge,
477 assert not both1['incomplete']
472 bothincompletediverge)
478 assert not both2['incomplete']
479 assert not bothincompletediverge
473 for f in remainder:
480 for f in remainder:
474 assert f not in bothdiverge
481 assert f not in bothdiverge
475 ic = remainder[f]
482 ic = remainder[f]
General Comments 0
You need to be logged in to leave comments. Login now