Mercurial, revert files to a past revision by wildcard?

こ雲淡風輕ζ 提交于 2021-01-27 04:12:10

问题


hg revert -r 4 -I *.aspx

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


回答1:


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$


来源:https://stackoverflow.com/questions/5906629/mercurial-revert-files-to-a-past-revision-by-wildcard

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!