powershell - Exclude directories when using hg purge -
i trying perform hg purge in repository need exclude directories (e.g. node_modules, , else) purge.
basically, want keep (not-delete) these directories, in order avoid downloading them again everytime.
this build process, runs hg purge before starting new build process , consequently removes ignored (listed in .hgignore). don't want happen directories node_modules , other else.
is there way tell mercurial not make purge on directories?
use -x/--exclude command line switch (can specified more once):
hg purge -x 'glob:node_modules/**.js' the above pattern ignores javascript files in node_modules directory, including in subdirectories. use /** match under directory:
hg purge -x 'glob:node_modules/**' see file names , pattern matching chapter in mercurial guide; patterns described there can used here.
when testing patterns, make sure use --print command-line option hg purge, it'll print files removed. helps when iterating patterns, don't have keep re-instating files between tries.
Comments
Post a Comment