[Bug 5246] New: hg push allows a new head to be pushed even when the remote server does not allow obsolete markers
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Wed May 25 00:17:18 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5246
Bug ID: 5246
Summary: hg push allows a new head to be pushed even when the
remote server does not allow obsolete markers
Product: Mercurial
Version: 3.6.2
Hardware: PC
OS: Mac OS
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: Mercurial
Assignee: bugzilla at selenic.com
Reporter: sean at farley.io
CC: mercurial-devel at selenic.com
When using evolve locally but not on the remote server (e.g. bitbucket),
Mercurial will gladly push a new head.
#!/bin/sh
# turn off all extensions
export HGRCPATH=/dev/null
hg init test-push-hg
hg clone test-push-hg test-push-hg-2
# enable obsolete in first repo
cat >> test-push-hg/.hg/hgrc << EOF
[experimental]
evolution=createmarkers,allowunstable
EOF
# turn remote repo into non-publishing
cat >> test-push-hg-2/.hg/hgrc << EOF
[phases]
publish = False
EOF
# create two commits
cd test-push-hg
echo a>>a
hg ci -Ama0 -u smf
echo a>>a
hg ci -ma1 -u smf
# push to remote repo and make sure we turn off all extensions
hg push ../test-push-hg-2
# amend last commit
echo a>>a
HGUSER=smf hg ci -ma2 --amend
# push should abort that it is adding a new head!
hg push ../test-push-hg-2
hg --cwd ../test-push-hg-2 heads -q | wc -l
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list