Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial, revert files to a past revision by wildcard?

Tags:

mercurial

hg revert -r 4 -I *.aspx

isn't working for me. Any help? And no, I don't want to use TortoiseHG.

like image 710
Jonathan Henson Avatar asked May 06 '11 04:05

Jonathan Henson


1 Answers

Try hg revert -r 4 -I **/*.aspx from the root directory of the repository. The **.aspx matches any file in any subdirectory in the repository whereas *.aspx only matches them in the current directory.

See hg help patterns for more information, which I've just noticed shows a regexp-based alternative:

  hg revert re:.*\.aspx$
like image 58
Niall C. Avatar answered Oct 22 '22 14:10

Niall C.