Mercurial,通过通配符将文件恢复到过去的版本? [英] Mercurial, revert files to a past revision by wildcard?
本文介绍了Mercurial,通过通配符将文件恢复到过去的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hg revert -r 4 -I *.aspx
对我不起作用.有什么帮助吗?不,我不想使用 TortoiseHG.
isn't working for me. Any help? And no, I don't want to use TortoiseHG.
推荐答案
从仓库根目录尝试 hg revert -r 4 -I **/*.aspx
em>.**.aspx
匹配存储库中任何子目录中的任何文件,而 *.aspx
仅匹配当前目录中的它们.
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.
查看 hg help patterns
了解更多信息,我刚刚注意到它显示了一个基于正则表达式的替代方案:
See hg help patterns
for more information, which I've just noticed shows a regexp-based alternative:
hg revert re:.*\.aspx$
这篇关于Mercurial,通过通配符将文件恢复到过去的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文