Search code examples
mercurial

Simple way to revert .orig files?


I've just gone and accidentally run hg revert *. Does Mercurial come with a tool to move all the .orig files back into place?


Solution

  • No. If you're in bash you can always do:

    for thefile in *.orig ; do cp -v $thefile ${thefile%%.orig} ; done