Mercurial Digest, Vol 28, Issue 41

Giorgos Keramidas keramida at ceid.upatras.gr
Sun Aug 26 08:20:35 CDT 2007


On 2007-08-25 19:15, Maxim Khitrov <mkhitrov at gmail.com> wrote:
> hg revert is more than happy to unadd files. If you run hg add in a
> brand new repository, simply run hg revert --all. Your repository is
> now back in the original state. Here's a way to revert files even if
> there are others with changed status:
>
> hg status | grep '^A' | sed 's/A //' | xargs hg revert

Which can be shortened even further to:

  hg status -a | cut -c 3- | xargs hg revert

:-)


More information about the Mercurial mailing list