[英]What is the format for specifying multiple tags to exclude from cvs2git
I understand I can perform a conversion of a CVS repository to GIT excluding all NIGHTLY_XXXX build tags by doing the following 我了解我可以通过执行以下操作来将CVS存储库转换为GIT(不包括所有NIGHTLY_XXXX构建标记)
cvs2git --exclude='NIGHTLY_.*' --blobfile=git-blob.dat --dumpfile=git-dump.dat --username=dev /opt/mycvsrepository/mymodule cvs2git --exclude ='NIGHTLY _。*'--blobfile = git-blob.dat --dumpfile = git-dump.dat --username = dev / opt / mycvsrepository / mymodule
But what is the format of the command line arguments if I also want to remove more than 1 wildcard? 但是,如果我也想删除1个以上的通配符,那么命令行参数的格式是什么? ie 即
"NIGHTLY_ " and "BETA_RELEASE_ " and "RC_*" “ NIGHTLY _ ”,“ BETA_RELEASE_ ”和“ RC_ *”
Many thanks in advance 提前谢谢了
You can construct a more complicated regular expression that matches all of the tag names that should be excluded, like 您可以构造一个更复杂的正则表达式,以匹配应排除的所有标签名称,例如
cvs2git --exclude='(NIGHTLY|BETA_RELEASE|RC)_.*' \
--blobfile=git-blob.dat --dumpfile=git-dump.dat \
--username=dev /opt/mycvsrepository/mymodule
But it is probably easier to use the --exclude
option multiple times; 但是,多次使用--exclude
选项可能更容易; eg, 例如,
cvs2git --exclude='NIGHTLY_.*' \
--exclude='BETA_RELEASE_.*' \
--exclude='RC_.*' \
--blobfile=git-blob.dat --dumpfile=git-dump.dat \
--username=dev /opt/mycvsrepository/mymodule
Sorry to answer my own question 抱歉回答我自己的问题
but thanks to this amazing https://regex101.com/ site I realized I need to give it as a regular expression 但是由于这个了不起的https://regex101.com/网站,我意识到我需要将其作为正则表达式
so the format would be 所以格式是
--exclude='(NIGHTLY_.* )|(BETA_RELEASE_.* )|(RC_.*)' --exclude ='(NIGHTLY _。*)|(BETA_RELEASE _。*)|(RC _。*)'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.