title: In mercurial, how do I apply a reverse-patch to a particular file?
body: <p>Related to <a href="https://stackoverflow.com/questions/1078881/mercurial-merging-one-file-between-branches-in-one-repo">Mercurial: Merging one file between branches in one repo</a> , I'm trying to perform a backout operation on a single file, even though that file was one of many participants in the revision being backed out.</p>
  
  <p>HG being the changeset-oriented tool that it is, it doesn't want to operate on files. </p>
  
  <p>Closest I could find was to use hg export to create a diff, hand-edit the diff, and then hg import to patch the file in reverse order.  </p>
  
  <p>..but then I hit this annoying situation where <a href="http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html" rel="nofollow noreferrer">http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html</a> claims that there is  a --reverse option to <code>hg patch</code>  when there is not.  </p>
  
  <p>So the closest thing I can think of is to generate a hand-edited patch as above, and then using vanilla patch -R to apply a reverse patch.</p>
  
  <p>The <code>hg backout</code> command would seem to be useful here, but is actually a red herring.</p>
  
  <p>There has GOT to be a better way, no?</p>