Lost changes during merges
Nicolas Dumazet
nicdumz at gmail.com
Wed Jan 20 02:46:26 CST 2010
Hello!
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.
>
> 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?
Maybe. A bad merge can cause many troubles.
>
> 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?
sure, this is actually really easy. Clone the repo, and strip the
merge revision:
hg strip 7722
This will destroy revision 7722 from the clone.
After this, you will be able to reproduce the merge to try to
understand what is happening.
If, when re-trying to merge afresh, you still dont understand what is
happening, we will need more data from you to help you,
for example a brief summary of each changes, if they include
move/copies/deletions, and/or work on the same set of files.
Regards,
>
> Thanks.
>
> --
> Best regards, Pavel
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
--
Nicolas Dumazet — NicDumZ
More information about the Mercurial
mailing list