Search code examples
version-controlcvscvsnt

In CVS how to commit all files as binary except a few whitelist


Can CVS cvswrappers be set up to treat all files as binary except for a few whitelisted extension?

Usually cvswrappers is used the other way around, ie. list all extensions which want to have keyword expansion -kb:

*.exe -k 'b'

But I need it the other way, so everything will be added/committed with -kb but everything else in the list is not.


Solution

  • I haven't tested this, but you should be able to put a binary wildcard at the end and your whitelist extensions above that with the default keyword expansion. e.g.

    *.txt -k 'kkv'
    * -k 'b'
    

    You might even be able to omit explicitly mentioning the default expansion mode, given the fact that it is the default. e.g.

    *.txt
    * -k 'b'
    

    Stepping back a bit, the only reason behind marking a file as binary is to stop keyword expansion. If you don't care about keyword expansion then you could just disable it by having the wildcard binary entry in CVSROOT/cvswrappers or alternatively adding the following to CVSROOT/config:

    # Do not expand any RCS keywords
    KeywordExpand=i
    

    References: