screwed up repo, i have no clue how i did it & how to solve it

Becker, Mischa J mischa.becker at fredmeyer.com
Tue Jan 29 19:53:26 UTC 2013


> -----Original Message-----
> From: mercurial-bounces at selenic.com [mailto:mercurial-
> bounces at selenic.com] On Behalf Of Roland Schmitz
> Sent: Tuesday, January 29, 2013 9:28 AM
> To: mercurial at selenic.com
> Subject: screwed up repo, i have no clue how i did it & how to solve it
>
> Hi together,
>
> i screwed up my mercurial repository, but i did not know how. I was
> working with it since 2006 without problems, but now i broke
> something. I can't remember what i did to get to this point.
> Some weeks ago i get the message that i can't push my repo to
> sourceforge, the message something like "Abort: push will create
> a new remote head xyz
> ((Did you forgett to merge? Use push -f to force))"
> After this i noticed my repo had 9 heads, by using "hg heads". But
> there was just the "default" branch, so i thougt there is nothing to
> merge. After some searching i found:
> $ hg update -r 149
> $ hg commit --close-branch -m 'Head mit id 149 geschlossen'
> $ hg update -C default
>
> I was lucky, all "8 old" heads closed, but as i noticed today, that's not
> the solution.
>
> Actual i have:
> $ hg tip
> Änderung:        152:f3ebeb800e91
> Marke:           tip
> Vorgänger:       149:b812a484bb66
> Nutzer:          Roland Schmitz <roland-schmitz at gmx.de>
> Datum:           Mon Jan 28 20:32:50 2013 +0100
> Zusammenfassung: Head mit id 149 geschlossen
>
> $ hg heads
> Änderung:        150:716dbb383599
> Vorgänger:       147:6c015687d9af
> Nutzer:          Roland Schmitz <roland-schmitz at gmx.de>
> Datum:           Mon Jan 28 20:31:26 2013 +0100
> Zusammenfassung: Tab funktioniert jetzt auch mit mehreren Key
> Spalten
>
> What i can see is that hg tip tells me that rev 152 is my tip, but 150 is my
> head. I hope someone can help me to understand what my error was
> to get to this situation, und next, to solve it.
>

Both revs 150 & 152 are heads.  Tip is just the last changeset added to your repo. It will be either the last change pulled in from another repo or the last change committed.  Anytime you have multiple heads, there is something available to merge.

If you are the only person who works on this repo, then what probably happened is one of the following:
1.  Pulled changes in from sourceforge but forgot to update to tip. Your next commit created a new head on the same branch.
2.  Made new changes in your current repo and then pulled in other changes from sourceforge.
3.  Updated to an earlier change and added a new commit.

Most of the time you will probably want to merge the two heads together so none of your changes are lost.  Hg makes this easy. If there are only two heads on a branch and the working directory's parent is one of them then all you have to do is type "hg merge".

Mischa

> Translation: Änderung = Change, Vorgänger = parent, Nutzer = user,
> Datum = date, Zusammenfassung = Merge comment
>
> --
> Mit freundlichem Gruss    Yours sincerely
>
>   Roland Schmitz
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial

________________________________

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential and protected by law from unauthorized disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


More information about the Mercurial mailing list