[Bug 4354] New: Bad interaction between obsolescence and mercurial not allowing the creation of extra heads
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Wed Sep 3 18:51:48 CDT 2014
http://bz.selenic.com/show_bug.cgi?id=4354
Priority: normal
Bug ID: 4354
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: Bad interaction between obsolescence and mercurial not
allowing the creation of extra heads
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: faheem at faheem.info
Hardware: PC
Status: UNCONFIRMED
Version: 3.1
Component: evolution
Product: Mercurial
Consider the following script. Create a cset. Push it to remote.
Then uncommit and prune it. Recommit. Then try to push.
This should work, because even though there are going to be two
heads in remote, one of them is (going to be) obsolescent, but at the time
of push only local knows this.
In fact this fails with the usual "abort: push creates new remote head"
error.
Tested with Mercurial 3.1 and evolve at cset bfa9d535f436.
This may have been fixed in more recent versions. I haven't tested it.
#####################################################################
#!/bin/sh
hg init test
cd test/
echo "line 1" >> foo
echo "line 1" >> bar
hg add foo bar; hg ci -m "commit foo bar"
hg init ../test-clone
echo "[phases]" >> ../test-clone/.hg/hgrc
echo "publish = False" >> ../test-clone/.hg/hgrc
hg clone . ../test-clone
hg push ../test-clone/
hg uncommit --all
hg prune .
hg ci -m "commit foo"
hg ci -m "commit bar"
hg push ../test-clone/
# pushing to ../test-clone/
# searching for changes
# abort: push creates new remote head 88756970997e!
# (merge or see "hg help push" for details about pushing new heads)
################################
echo "***printing log of test***\n"
hg log -R . -vG --hidden
# ***printing log of test***
# @ changeset: 2:88756970997e
# tag: tip
# parent: -1:000000000000
# user: Faheem Mitha <faheem at faheem.info>
# date: Thu Sep 04 05:08:37 2014 +0530
# files: bar foo
# description:
# commit foo
# x changeset: 1:859ef97ed83a
# parent: -1:000000000000
# user: Faheem Mitha <faheem at faheem.info>
# date: Thu Sep 04 05:08:36 2014 +0530
# description:
# commit foo bar
# x changeset: 0:9d914071e8c2
# user: Faheem Mitha <faheem at faheem.info>
# date: Thu Sep 04 05:08:36 2014 +0530
# files: bar foo
# description:
# commit foo bar
echo "***printing log of test-clone***\n"
hg log -R ../test-clone -vG --hidden
# ***printing log of test-clone***
# o changeset: 0:9d914071e8c2
# tag: tip
# user: Faheem Mitha <faheem at faheem.info>
# date: Thu Sep 04 05:08:36 2014 +0530
# files: bar foo
# description:
# commit foo bar
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list