Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
evolve-native-test
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Raphaël Gomès
evolve-native-test
Commits
2d9902f0
Commit
2d9902f0
authored
6 years ago
by
Anton Shestakov
Browse files
Options
Downloads
Patches
Plain Diff
safeguard: allow push to succeed (and without warning) with --publish
parent
41980174
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG
+4
-0
4 additions, 0 deletions
CHANGELOG
hgext3rd/evolve/safeguard.py
+2
-1
2 additions, 1 deletion
hgext3rd/evolve/safeguard.py
tests/test-obsolete-push.t
+13
-0
13 additions, 0 deletions
tests/test-obsolete-push.t
with
19 additions
and
1 deletion
CHANGELOG
+
4
−
0
View file @
2d9902f0
Changelog
=========
8.4.0 - in progress
-------------------
* push: have `--publish` overrule the `auto-publish` config
8.3.2 - in progress
-------------------
...
...
This diff is collapsed.
Click to expand it.
hgext3rd/evolve/safeguard.py
+
2
−
1
View file @
2d9902f0
...
...
@@ -26,7 +26,8 @@
def
checkpush
(
self
,
pushop
):
super
(
noautopublishrepo
,
self
).
checkpush
(
pushop
)
behavior
=
self
.
ui
.
config
(
'
experimental
'
,
'
auto-publish
'
,
'
default
'
)
if
behavior
not
in
(
'
warn
'
,
'
abort
'
):
nocheck
=
behavior
not
in
(
'
warn
'
,
'
abort
'
)
if
nocheck
or
getattr
(
pushop
,
'
publish
'
,
False
):
return
remotephases
=
pushop
.
remote
.
listkeys
(
'
phases
'
)
publishing
=
remotephases
.
get
(
'
publishing
'
,
False
)
...
...
This diff is collapsed.
Click to expand it.
tests/test-obsolete-push.t
+
13
−
0
View file @
2d9902f0
...
...
@@ -4,6 +4,7 @@
>
[
extensions
]
>
EOF
$
echo
"
evolve=$(echo $(dirname
$TESTDIR
))/hgext3rd/evolve/
"
>>
$HGRCPATH
$
echo
"
topic=$(echo $(dirname
$TESTDIR
))/hgext3rd/topic/
"
>>
$HGRCPATH
$
template
=
'
{rev}:{node|short}@{branch}({separate("/", obsolete, phase)}) {desc|firstline}\n
'
$
glog
()
{
...
...
@@ -91,3 +92,15 @@
adding
manifests
adding
file
changes
added
0
changesets
with
0
changes
to
1
files
--
publish
overrides
auto
-
publish
$
echo
d
>
d
$
hg
ci
-
qAm
D
d
$
hg
push
-
r
.
--
publish
--
config
experimental
.
auto
-
publish
=
abort
pushing
to
$TESTTMP
/
source
searching
for
changes
adding
changesets
adding
manifests
adding
file
changes
added
1
changesets
with
1
changes
to
1
files
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