Mercurial > hg
comparison mercurial/copies.py @ 44197:17e12938f8e7
copies: print debug information about copies per side/branch
Differential Revision: https://phab.mercurial-scm.org/D7987
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 24 Jan 2020 10:39:55 -0800 |
parents | 6ca9f45b32b0 |
children | 7f8bdee0034e |
comparison
equal
deleted
inserted
replaced
44196:6ca9f45b32b0 | 44197:17e12938f8e7 |
---|---|
628 if u1: | 628 if u1: |
629 repo.ui.debug(b"%s:\n %s\n" % (header % b'local', b"\n ".join(u1))) | 629 repo.ui.debug(b"%s:\n %s\n" % (header % b'local', b"\n ".join(u1))) |
630 if u2: | 630 if u2: |
631 repo.ui.debug(b"%s:\n %s\n" % (header % b'other', b"\n ".join(u2))) | 631 repo.ui.debug(b"%s:\n %s\n" % (header % b'other', b"\n ".join(u2))) |
632 | 632 |
633 fullcopy = copies1.copy() | |
634 fullcopy.update(copies2) | |
635 | |
636 if repo.ui.debugflag: | 633 if repo.ui.debugflag: |
637 renamedeleteset = set() | 634 renamedeleteset = set() |
638 divergeset = set() | 635 divergeset = set() |
639 for dsts in diverge.values(): | 636 for dsts in diverge.values(): |
640 divergeset.update(dsts) | 637 divergeset.update(dsts) |
645 | 642 |
646 repo.ui.debug( | 643 repo.ui.debug( |
647 b" all copies found (* = to merge, ! = divergent, " | 644 b" all copies found (* = to merge, ! = divergent, " |
648 b"% = renamed and deleted):\n" | 645 b"% = renamed and deleted):\n" |
649 ) | 646 ) |
650 for f in sorted(fullcopy): | 647 for side, copies in ((b"local", copies1), (b"remote", copies2)): |
651 note = b"" | 648 if not copies: |
652 if f in copy1 or f in copy2: | 649 continue |
653 note += b"*" | 650 repo.ui.debug(b" on %s side:\n" % side) |
654 if f in divergeset: | 651 for f in sorted(copies): |
655 note += b"!" | 652 note = b"" |
656 if f in renamedeleteset: | 653 if f in copy1 or f in copy2: |
657 note += b"%" | 654 note += b"*" |
658 repo.ui.debug( | 655 if f in divergeset: |
659 b" src: '%s' -> dst: '%s' %s\n" % (fullcopy[f], f, note) | 656 note += b"!" |
660 ) | 657 if f in renamedeleteset: |
658 note += b"%" | |
659 repo.ui.debug( | |
660 b" src: '%s' -> dst: '%s' %s\n" % (copies[f], f, note) | |
661 ) | |
661 del renamedeleteset | 662 del renamedeleteset |
662 del divergeset | 663 del divergeset |
663 | 664 |
664 repo.ui.debug(b" checking for directory renames\n") | 665 repo.ui.debug(b" checking for directory renames\n") |
665 | 666 |