Reputation: 26637
I'm running hg 1.7.5 and I had a similar problem earlier on the mercurial mailing list and we could solve it by running hg revert -a. Now I did run hg revert and it didn't solve the problem. I had problems with my filesystems and I had to interrupt a transaction now when I ran `hg commit' I get a new head
$ hg commit -m 'changes'
skapade ett nytt huvud
ubuntu@ubuntu:/media/Lexar/montao/montaoproject$
The localized message means hg created a new head. hg diff shows nothing. Could you say what I can do?
$ hg heads
ändring: 322:d74d7e14fe44
märke: tip
förälder: -1:000000000000
användare: niklasro
datum: Fri Dec 02 02:22:31 2011 +0000
kortfattat: changes
ändring: 321:470a570041e0
användare: niklasro
datum: Sat Nov 26 22:38:16 2011 +0000
kortfattat: bug fixes for insert
ubuntu@ubuntu:/media/Lexar/montao/montaoproject$
Update
I had to do a merge which it could do, then I could commit and push so now there is only one head like it should be:
$ hg heads
ändring: 324:eccc83b75b58
märke: tip
förälder: 323:5842204042f5
förälder: 322:d74d7e14fe44
användare: niklasro
datum: Fri Dec 02 09:01:35 2011 +0000
kortfattat: changes
ubuntu@ubuntu:/media/Lexar/montao/montaoproject$
Upvotes: 0
Views: 382
Reputation: 7661
If you want to keep your recent changes, try this:
hg update -r 321 --clean
hg commit -m 'changes'
If you don't need your changes, you may just update to the rev 321 and then strip rev 322 using patch queue. I'm not used to work with hg in console, so I'll write how to do this in TortoiseHg.
First, enable the 'mq' extension:
Strip revision:
Upvotes: 2