Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/phases.py (4 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute |
* subset is heads of the subset | * subset is heads of the subset | ||||
* roots is {<nodeid> => phase} mapping. key and value are string. | * roots is {<nodeid> => phase} mapping. key and value are string. | ||||
Accept unknown element input | Accept unknown element input | ||||
""" | """ | ||||
repo = repo.unfiltered() | repo = repo.unfiltered() | ||||
# build list from dictionary | # build list from dictionary | ||||
draftroots = [] | draftroots = [] | ||||
nodemap = repo.changelog.nodemap # to filter unknown nodes | has_node = repo.changelog.index.has_node # to filter unknown nodes | ||||
for nhex, phase in pycompat.iteritems(roots): | for nhex, phase in pycompat.iteritems(roots): | ||||
if nhex == b'publishing': # ignore data related to publish option | if nhex == b'publishing': # ignore data related to publish option | ||||
continue | continue | ||||
node = bin(nhex) | node = bin(nhex) | ||||
phase = int(phase) | phase = int(phase) | ||||
if phase == public: | if phase == public: | ||||
if node != nullid: | if node != nullid: | ||||
repo.ui.warn( | repo.ui.warn( | ||||
_( | _( | ||||
b'ignoring inconsistent public root' | b'ignoring inconsistent public root' | ||||
b' from remote: %s\n' | b' from remote: %s\n' | ||||
) | ) | ||||
% nhex | % nhex | ||||
) | ) | ||||
elif phase == draft: | elif phase == draft: | ||||
if node in nodemap: | if has_node(node): | ||||
draftroots.append(node) | draftroots.append(node) | ||||
else: | else: | ||||
repo.ui.warn( | repo.ui.warn( | ||||
_(b'ignoring unexpected root from remote: %i %s\n') | _(b'ignoring unexpected root from remote: %i %s\n') | ||||
% (phase, nhex) | % (phase, nhex) | ||||
) | ) | ||||
# compute heads | # compute heads | ||||
publicheads = newheads(repo, subset, draftroots) | publicheads = newheads(repo, subset, draftroots) |