equal
deleted
inserted
replaced
670 Accept unknown element input |
670 Accept unknown element input |
671 """ |
671 """ |
672 repo = repo.unfiltered() |
672 repo = repo.unfiltered() |
673 # build list from dictionary |
673 # build list from dictionary |
674 draftroots = [] |
674 draftroots = [] |
675 nodemap = repo.changelog.nodemap # to filter unknown nodes |
675 has_node = repo.changelog.index.has_node # to filter unknown nodes |
676 for nhex, phase in pycompat.iteritems(roots): |
676 for nhex, phase in pycompat.iteritems(roots): |
677 if nhex == b'publishing': # ignore data related to publish option |
677 if nhex == b'publishing': # ignore data related to publish option |
678 continue |
678 continue |
679 node = bin(nhex) |
679 node = bin(nhex) |
680 phase = int(phase) |
680 phase = int(phase) |
686 b' from remote: %s\n' |
686 b' from remote: %s\n' |
687 ) |
687 ) |
688 % nhex |
688 % nhex |
689 ) |
689 ) |
690 elif phase == draft: |
690 elif phase == draft: |
691 if node in nodemap: |
691 if has_node(node): |
692 draftroots.append(node) |
692 draftroots.append(node) |
693 else: |
693 else: |
694 repo.ui.warn( |
694 repo.ui.warn( |
695 _(b'ignoring unexpected root from remote: %i %s\n') |
695 _(b'ignoring unexpected root from remote: %i %s\n') |
696 % (phase, nhex) |
696 % (phase, nhex) |