简体   繁体   中英

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

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? ie

"NIGHTLY_ " and "BETA_RELEASE_ " and "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; 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

so the format would be

--exclude='(NIGHTLY_.* )|(BETA_RELEASE_.* )|(RC_.*)'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM