Richard
Richard

Reputation: 32909

Mercurial: roll back a patch?

I was trying to create a patch for review. I should have done $ diff -u oldfile newfile > tiny.patch, but instead I did hg qnew 404.patch.

Now my log looks like this:

changeset:   2913:82fc6e8ec5aa
tag:         404.patch
tag:         qbase
tag:         qtip
tag:         tip
user:        xxxxxx
date:        Fri Sep 23 12:09:53 2011 +0100
summary:     [mq]: 404.patch

changeset:   2912:87e6ed84fe2f
tag:         qparent
user:        xxxxxx
date:        Fri Sep 23 10:45:10 2011 +0100
summary:     Change that I want to keep

How can I get rid of the top changeset? I mean delete, kill, remove from history - I just don't want it in the log.

hg rollback gives me no rollback information available.

Thanks!

Upvotes: 3

Views: 700

Answers (1)

Luke Girvin
Luke Girvin

Reputation: 13432

Just run

hg qpop -a

To pop off the unwanted patch, then

hg qdelete 404.patch

to delete it, then start again.

Upvotes: 4

Related Questions