Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
codeaster-fra
devtools
Commits
7224ca29
Commit
7224ca29
authored
6 years ago
by
'mergerobot ext:(%27)
Browse files
Options
Downloads
Plain Diff
merge 'edf/mc'
parents
fc49c342
07f60c61
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/hgaster/hooks/generic.py
+9
-4
9 additions, 4 deletions
lib/hgaster/hooks/generic.py
with
9 additions
and
4 deletions
lib/hgaster/hooks/generic.py
+
9
−
4
View file @
7224ca29
...
...
@@ -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
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment