[Bug 3901] New: `hg pull --rebase` does not abort if rebase fails: surprising.
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Mon Apr 22 15:26:37 CDT 2013
http://bz.selenic.com/show_bug.cgi?id=3901
Priority: normal
Bug ID: 3901
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: `hg pull --rebase` does not abort if rebase fails:
surprising.
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: g.gherdovich at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 2.5.4
Component: rebase
Product: Mercurial
If I run `hg pull --rebase` to get my commits on top of the retrieved chageset,
but my commit cannot be rebased because they are shared, I would expect the
whole command to fail, not just the "--rebase" part.
What mercurial does is: it pulls, but it doesn't rebase.
Here a minimal example:
+++++++++++++++++++++++++++++++++++++++++
~$ hg init a
~$ cd a
~/a$ touch foo ; hg add foo ; hg commit -m "foo"
~/a$ cd ..
~$ hg clone a b
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
~$ cd a
~/a$ touch bar ; hg add bar ; hg commit -m "bar"
~/a$ cd ..
~$ cd b
~/b$ touch baz ; hg add baz ; hg commit -m "baz"
~/b$ hg log --graph
@ changeset: 1:f8413cafe023
| tag: tip
| user: gghh
| date: Mon Apr 22 22:06:12 2013 +0200
| summary: baz
|
o changeset: 0:e86beadd55ac
user: gghh
date: Mon Apr 22 22:05:31 2013 +0200
summary: foo
+++++++++++++++++++++++++++++++++++++++++
now I promote changeset 1 in repo b to "public", to make the rebase fail:
+++++++++++++++++++++++++++++++++++++++++
~/b$ hg phase -r 0::1
0: public
1: draft
~/b$ hg phase --public -r 1
+++++++++++++++++++++++++++++++++++++++++
and ...
+++++++++++++++++++++++++++++++++++++++++
~/b$ hg pull --rebase
pulling from /home/gghh/garbageApr22/a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
abort: can't rebase immutable changeset f8413cafe023
(see hg help phases for details)
+++++++++++++++++++++++++++++++++++++++++
voila, double head:
+++++++++++++++++++++++++++++++++++++++++
~/b$ hg log --graph
o changeset: 2:1dd43df7049c
| tag: tip
| parent: 0:e86beadd55ac
| user: gghh
| date: Mon Apr 22 22:05:59 2013 +0200
| summary: bar
|
| @ changeset: 1:f8413cafe023
|/ user: gghh
| date: Mon Apr 22 22:06:12 2013 +0200
| summary: baz
|
o changeset: 0:e86beadd55ac
user: gghh
date: Mon Apr 22 22:05:31 2013 +0200
summary: foo
~/b$ hg heads
changeset: 2:1dd43df7049c
tag: tip
parent: 0:e86beadd55ac
user: gghh
date: Mon Apr 22 22:05:59 2013 +0200
summary: bar
changeset: 1:f8413cafe023
user: gghh
date: Mon Apr 22 22:06:12 2013 +0200
summary: baz
+++++++++++++++++++++++++++++++++++++++++
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list