howto suspend work
Arne Babenhauserheide
arne_bab at web.de
Thu Jun 4 06:34:13 CDT 2009
On Thursday, 4. June 2009 13:02:14 Neal Becker wrote:
> Backout sounds like the way to go. But here's what I got:
>
> hg backout 849
> abort: cannot back out change on a different branch
To backout directly, you need to issue the backout before you go back to work
on a different branch.
If you already kept working, you can just update to the bad head, backout
there and them merge the backout.
Here's an example history for that:
$ hg glog
@ changeset: 6:90f233f547cf
|\ tag: tip
| | parent: 5:e295e67313d7
| | parent: 4:566039ad51e9
| | user: Arne Babenhauserheide <bab at draketo.de>
| | date: Thu Jun 04 13:32:33 2009 +0200
| | summary: merge backed out bad change
| |
| o changeset: 5:e295e67313d7
| | parent: 3:c19095541b18
| | user: Arne Babenhauserheide <bab at draketo.de>
| | date: Thu Jun 04 13:32:32 2009 +0200
| | summary: Backed out changeset c19095541b18
| |
o | changeset: 4:566039ad51e9
| | parent: 2:59d5899d0abb
| | user: Arne Babenhauserheide <bab at draketo.de>
| | date: Thu Jun 04 13:32:29 2009 +0200
| | summary: 2
| |
| o changeset: 3:c19095541b18
|/ user: Arne Babenhauserheide <bab at draketo.de>
| date: Thu Jun 04 13:32:28 2009 +0200
| summary: falsch2
|
o changeset: 2:59d5899d0abb
| user: Arne Babenhauserheide <bab at draketo.de>
| date: Thu Jun 04 13:32:28 2009 +0200
| summary: Backed out changeset 455f46adc8f5
|
o changeset: 1:455f46adc8f5
| user: Arne Babenhauserheide <bab at draketo.de>
| date: Thu Jun 04 13:32:24 2009 +0200
| summary: falsch
|
o changeset: 0:7559a3155eb2
user: Arne Babenhauserheide <bab at draketo.de>
date: Thu Jun 04 13:32:24 2009 +0200
summary: 1
To do this:
# prepare the repo
hg init repo
cd repo
echo 1 > 1
hg add 1
hg ci -m 1
# make a bad commit
echo falsch > 1
hg ci -m falsch
# backout it directly
hg backout .
# make another bad commit, go back and make a good head
echo falsch2 > 1
hg ci -m falsch2
hg up -r -2 # previous commit
echo 2 > 1
hg ci -m 2
# backout the bad commit afterwards
hg up -C -r -2 # previous commit; on another branch
hg backout .
hg merge
hg ci -m "merge backed out bad change"
Best wishes,
Arne
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
- singing a part of the history of free software -
http://infinite-hands.draketo.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.sh
Type: application/x-shellscript
Size: 454 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20090604/c153d3cc/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial/attachments/20090604/c153d3cc/attachment.pgp
More information about the Mercurial
mailing list