Skip to content
Snippets Groups Projects
Commit b345f851 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

phase: extracts heads computation logics from analyzeremotephases

parent 52dc2b33
No related branches found
No related tags found
No related merge requests found
......@@ -285,8 +285,6 @@
repo.ui.warn(_('ignoring unexpected root from remote: %i %s\n')
% (phase, nhex))
# compute heads
revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
subset, draftroots, draftroots, subset)
publicheads = [c.node() for c in revset]
publicheads = newheads(repo, subset, draftroots)
return publicheads, draftroots
......@@ -291,2 +289,11 @@
return publicheads, draftroots
def newheads(repo, heads, roots):
"""compute new head of a subset minus another
* `heads`: define the first subset
* `rroots`: define the second we substract to the first"""
revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
heads, roots, roots, heads)
return [c.node() for c in revset]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment