The difference between update and merge (was: Completely baffled)
Isaac Jurado
diptongo at gmail.com
Wed Dec 7 11:39:52 UTC 2011
On Wed, Dec 7, 2011 at 11:53 AM, Dennis Brakhane
<brakhane at googlemail.com> wrote:
>
> $ hg resolve -u afile # IMPORTANT, as mentioned in Martin's and my second email
> $ hg resolve afile --tool internal:local
> $ cat afile
> asdf asdf asdf asdf asdf a
> kkkkkkkkkkkkkkkkkkkkkkkk
> poiua pioaiusdf puasf -lqwer
> qer -.qmwe-.q,mweer m
> qwer-,m qwew-r.,m
>
>> If you cannnot find it, you have lost work.
>
> I can, therefore I haven't. ;-)
>
>> I'm not blaming mercurial, I'm just warning from a BAD PRACTICE. I've
>> lost a lot of work before learning that the proper way is commiting
>> before and NOT letting "hg update" merge my dirty working copy.
>
> As Martin said, it might not be the best practice to update a dirty
> copy, but hg (as always) tries hard to prevent you from losing work.
Indeed. I just added this trick to my [alias] section of my ~/.hgrc:
[alias]
restore = !$HG resolve -u ${HG_ARGS#restore} && $HG resolve -t
internal:local ${HG_ARGS#restore}
Thanks for the suggestion.
--
Isaac Jurado
"The noblest pleasure is the joy of understanding"
Leonardo da Vinci
More information about the Mercurial
mailing list