##// END OF EJS Templates
checkcopies: handle divergences contained entirely in tca::ctx...
Gábor Stefanik -
r30201:856ead83 default
parent child Browse files
Show More
@@ -564,9 +564,8 b' def _checkcopies(ctx, f, m1, m2, base, t'
564 # traversed backwards.
564 # traversed backwards.
565 #
565 #
566 # In the case there is both backward and forward renames (before and after
566 # In the case there is both backward and forward renames (before and after
567 # the base) this is more complicated as we must detect a divergence. This
567 # the base) this is more complicated as we must detect a divergence.
568 # is currently broken and hopefully some later code update will make that
568 # We use 'backwards = False' in that case.
569 # work (we use 'backwards = False' in that case)
570 backwards = base != tca and f in mb
569 backwards = base != tca and f in mb
571 getfctx = _makegetfctx(ctx)
570 getfctx = _makegetfctx(ctx)
572
571
@@ -600,6 +599,12 b' def _checkcopies(ctx, f, m1, m2, base, t'
600 data['copy'][of] = f
599 data['copy'][of] = f
601 elif of in mb:
600 elif of in mb:
602 data['copy'][f] = of
601 data['copy'][f] = of
602 else: # divergence w.r.t. graft CA on one side of topological CA
603 for sf in seen:
604 if sf in mb:
605 assert sf not in data['diverge']
606 data['diverge'][sf] = [f, of]
607 break
603 return
608 return
604
609
605 if of in mb:
610 if of in mb:
@@ -982,6 +982,9 b' Test the cases A.0 (f4x) and A.6 (f3x)'
982
982
983 $ HGEDITOR="echo D1 >" hg graft -r 'desc("D0")' --edit
983 $ HGEDITOR="echo D1 >" hg graft -r 'desc("D0")' --edit
984 grafting 3:b69f5839d2d9 "D0"
984 grafting 3:b69f5839d2d9 "D0"
985 note: possible conflict - f3b was renamed multiple times to:
986 f3d
987 f3a
985 warning: can't find ancestor for 'f3d' copied from 'f3b'!
988 warning: can't find ancestor for 'f3d' copied from 'f3b'!
986
989
987 Set up the repository for some further tests
990 Set up the repository for some further tests
General Comments 0
You need to be logged in to leave comments. Login now