Skip to content
Snippets Groups Projects
Commit 7224ca29 authored by 'mergerobot ext:(%27)'s avatar 'mergerobot ext:(%27)
Browse files

merge 'edf/mc'

parents fc49c342 07f60c61
No related branches found
No related tags found
No related merge requests found
......@@ -177,14 +177,19 @@ def single_head_per_branch_hook(in_branch=None):
pretxnchangegroup.check_heads = python:aster.hooks.single_head_per_branch
"""
node = repo[node]
if node.phase() == hg.phases.secret:
ui.warn("ERROR: you are submitting a secret changeset!")
return NOOK
for branch, heads in repo.branchmap().items():
if in_branch and not re.search(in_branch, branch):
continue
node = repo[node]
if node.branch() != branch or node.phase() == hg.phases.secret:
if node.branch() != branch:
continue
unclosed = [head for head in heads
if not repo[head].extra().get("close")]
revs = [repo[head] for head in heads]
unclosed = [rev for rev in revs if not rev.extra().get("close")
and rev.phase() != hg.phases.secret]
if len(unclosed) > 1:
ui.warn("ERROR: Only one head per branch is allowed "
"(problem on branch '{0}')!\n"
......
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