hg rollback option wanted

Matt Mackall mpm at selenic.com
Wed Dec 19 01:26:28 UTC 2007


On Tue, Dec 18, 2007 at 11:43:53AM -0800, Greg Lindahl wrote:
> I did a commit: whoops, I accidentally got stuff into it that doesn't
> belong. If I notice while I'm editing the commit message, I can kill
> the editor and do hg recover, but let's say I used -m, and so I noticed
> the problem after the commit successfully finished.

If you simply exit the editor with no message, or otherwise cause it
to return a non-zero code, it will cleanly abort the commit with no
need to run recover.
 
> hg rollback doesn't quite do the trick. I want an option to leave the
> dirstate alone, to return to the same state the repo was in before the
> commit.

Well commit saves a backup of the dirstate before the commit, and rollback
restores it, so your query is puzzling.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list