equal
deleted
inserted
replaced
562 # If the file exists in both the base and the source, we are not looking |
562 # If the file exists in both the base and the source, we are not looking |
563 # for a rename on the source side, but on the part of the DAG that is |
563 # for a rename on the source side, but on the part of the DAG that is |
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 |
573 of = None |
572 of = None |
574 seen = set([f]) |
573 seen = set([f]) |
598 if cr and (of == f or of == c2.path()): # non-divergent |
597 if cr and (of == f or of == c2.path()): # non-divergent |
599 if backwards: |
598 if backwards: |
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: |
606 data['diverge'].setdefault(of, []).append(f) |
611 data['diverge'].setdefault(of, []).append(f) |
607 |
612 |