Lost changes during merges

Abderrahim Kitouni a.kitouni at gmail.com
Wed Jan 20 09:12:20 UTC 2010


Hi,

2010/1/20 Pavel Shevaev <pacha.shevaev at gmail.com>:
> Folks, from time to time we at my company are facing strange issues
> during merges: the code is getting lost for some reason.
>
> Here is one of such situations when my(pachanga) changes in revision
> 7684(--some feature C) got lost during merge in revision 7722.
>
> o      changeset:   7722:180b55133042
> |\      parent:      7721:f0c962ce460a
> | |     parent:      7684:644fa64bcb94
> | |     user:        Darthvader
> | |     date:        Tue Jan 19 09:23:59 2010 +0300
> | |     summary:     -- merge
> | |
> | o    changeset:   7719:f4692a47d6bd
> |  | \   parent:      7718:9bebcd306795
> |  |  |  parent:      7675:441060480ba9
> |  |  |  user:        Darthvader
> |  |  |  date:        Mon Jan 18 17:32:00 2010 +0300
> |  |  |  summary:     -- merge
> |  |  |
> |  |  o  changeset:   7718:9bebcd306795
> |  |  |  parent:      7667:3262d51e6d84
> |  |  |  user:        Darthvader
> |  |  |  date:        Mon Jan 18 17:29:43 2010 +0300
> |  |  |  summary:     -- some feature D
> |  |  |
> o |  |  changeset:   7684:644fa64bcb94
> |  |  |  user:        pachanga
> |  |  |  date:        Tue Jan 19 00:56:06 2010 +0300
> |  |  |  summary:     -- some feature C
> |  |  |
> o |  |  changeset:   7674:3fb6d83e3fd4
> |/  /    user:        pachanga
> |  |     date:        Mon Jan 18 18:02:15 2010 +0300
> |  |     summary:     -- some feature B
> |  |
> o |     changeset:   7669:3deefa7cd6bd
> |/        user:        pachanga
> |         date:        Mon Jan 18 15:38:40 2010 +0300
> |         summary:     -- some feature A
>
> I asked the developer(Darthvader) who made the merge in 7722 revision
> if he got at least any conflicts during merge and he told me
> everything went smooth.
Since mercurial doesn't do the merge by itself, it may be a bug in
your merge tool.
>
> I tried to browse log changes for all revisions in this period of time
> and I couldn't find any pointers why revision 7684 silently
> disappeared.
>
> Could please anyone give an advice how this can be avoided in the
> future? Maybe this situation arises due to our improper usage of
> Mercurial?
>
> Can I at least reproduce the moment of the merge somehow? I mean
> somehow clone the current repo to the new one which is in the state
> right before the merge?
hg clone -r 7721 -r 7684 repo
(this will get only the parents of the merge, if you have other heads,
you'll need to pull them as well either by adding them as -r options
to the clone command or later by using pull -r)

HTH,
Abderrahim



More information about the Mercurial mailing list