undo changes to a single file earlier in history with subsequent modifications

Wujek Srujek wujek.srujek at gmail.com
Thu Nov 22 11:35:25 UTC 2012


Hi. I needed to revert a change done to a single file only, and the
changeset was not the latest one, and after that change, the file was
further changed. What I did was sth like:
hg diff -r 194:193 file/to/change > ../reverse.diff
hg patch --no-commit ../reverse.diff

The problem is that this is based on patches, and there could be some
rejects if the reverse diff was no longer consistent with the other changes
that were done later, right? (In my case, it applied cleanly, just asking.)

Is there a better way to achieve what I wanted?

wujek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20121122/7c69f7c1/attachment-0002.html>


More information about the Mercurial mailing list