开发者

How do i recursively remove folders from mercurial tracking system

开发者 https://www.devze.com 2023-02-07 11:22 出处:网络
I have a working directory structure like the below one : mercurial_working_dir: project1 project2 project3

I have a working directory structure like the below one :

mercurial_working_dir:

  • project1
  • project2
  • project3

Under each project folder there are common folders that i want to untrack from mercurial.e.g: i dont want any file to be tracked under /metadata folder which is common at the 3 projects. As far as i know i should use hg remove -Af command with the specifing files.Is there any way to define regular exps at the command in order to recursively "remove" the current version of any file under the metadata folder which is placed at all my 开发者_如何学Pythonprojects?


Take a look at the chapter about file names and pattern matching in the mercurial book. You can use a pattern like this:

hg rm "glob:**/metadata/**"

If you prefer regular expressions, you can also use the re: prefix instead of glob:.

0

精彩评论

暂无评论...
验证码 换一张
取 消