What is the format for specifying multiple tags to exclude from cvs2git

172 Views Asked by At

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? i.e

"NIGHTLY_" and "BETA_RELEASE_" and "RC_*"

Many thanks in advance

2

There are 2 best solutions below

0
MyDeveloperDay On

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_.*)'

0
mhagger On

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; e.g.,

cvs2git --exclude='NIGHTLY_.*' \
        --exclude='BETA_RELEASE_.*' \
        --exclude='RC_.*' \
        --blobfile=git-blob.dat --dumpfile=git-dump.dat \
        --username=dev /opt/mycvsrepository/mymodule