Completely baffled
Martin Geisler
mg at aragost.com
Tue Dec 6 09:53:15 UTC 2011
Isaac Jurado <diptongo at gmail.com> writes:
> On Mon, Dec 5, 2011 at 11:35 AM, Martin Geisler <mg at aragost.com> wrote:
>>
>> Running
>>
>> $ hg commit
>> $ hg pull --rebase
>>
>> should do the same as running:
>>
>> $ hg pull --update
>> $ hg commit
>>
>> with the difference that you have the option to further tweak your
>> dirty working copy before you actually do the commit. In particular,
>> the any merge conflicts should be the same and you should get the
>> same tool support.
>
> I'm sorry to disagree but, no way. I know update merges three-way but
> there is one major drawback: you can't go back. With merge or rebase,
> you can abort and start over as many times as you want.
That is an important difference: the changes are stored "more robustly"
in their own changesets when you merge or rebase. So it's more difficult
to accidentally lose them.
> Unless there is something I don't know about, updating a dirty working
> copy is only one way.
You can use 'hg resolve' after the update to re-do the merge and even
resurrect the old version of your modified files.
I haven't tested this right now, but I would expect
hg resolve --all --tool internal:local
hg update OLDREV
to get you safely back to where you were before you ran 'hg update NEW'.
Please let us know if you test this.
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/
More information about the Mercurial
mailing list