(cvs.info.gz) Updating Commit Files
Info Catalog
(cvs.info.gz) commit files
C.3.3.1 Updating legacy repositories to stop using deprecated command line template formats
...........................................................................................
New repositories are created set to use the new format strings by
default, so if you are creating a new repository, you shouldn't have to
worry about this section.
If you are attempting to maintain a legacy repository which was
making use of the `commitinfo', `editinfo', `verifymsg', `loginfo',
and/or `taginfo' script hooks, you should have no immediate problems
with using the current CVS executable, but your users will probably
start to see deprecation warnings.
The reason for this is that all of the script hooks have been
updated to use a new command line parser that extensibly supports
multiple `loginfo' & `notify' style format strings ( syntax) and
this support is not completely compatible with the old style format
strings.
The quick upgrade method is to stick a `1' after each format string
in your old `loginfo' file. For example:
DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
would become:
DEFAULT (echo ""; id; echo %1{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
If you were counting on the fact that only the first `%' in the line
was replaced as a format string, you may also have to double up any
further percent signs on the line.
If you did this all at once and checked it in, everything should
still be running properly.
Now add the following line to your config file ( config):
UseNewInfoFmtStrings=yes
Everything should still be running properly, but your users will
probably start seeing new deprecation warnings.
Dealing with the deprecation warnings now generated by `commitinfo',
`editinfo', `verifymsg', and `taginfo' should be easy. Simply specify
what are currently implicit arguments explicitly. This means appending
the following strings to each active command line template in each file:
`commitinfo'
` %r/%p %s'
`editinfo'
` %l'
`taginfo'
` %t %o %p %{sv}'
`verifymsg'
` %l'
If you don't desire that any of the newly available information be
passed to the scripts hanging off of these hooks, no further
modifications to these files should be necessary to insure current and
future compatibility with CVS's format strings.
Fixing `loginfo' could be a little tougher. The old style `loginfo'
format strings caused a single space and comma separated argument to be
passed in in place of the format string. This is what will continue to
be generated due to the deprecated `1' you inserted into the format
strings.
Since the new format separates each individual item and passes it
into the script as a separate argument (for a good reason - arguments
containing commas and/or white space are now parsable), to remove the
deprecated `1' from your `loginfo' command line templates, you will
most likely have to rewrite any scripts called by the hook to handle
the new argument format.
Also note that the way `%' followed by unrecognized characters and by
`{}' was treated in past versions of CVS is not strictly adhered to as
there were bugs in the old versions. Specifically, `%{}' would eat the
next character and unrecognized strings resolved only to the empty
string, which was counter to what was stated in the documentation.
This version will do what the documentation said it should have (if you
were using only some combination of `%{sVv}', e.g. `%{sVv}', `%{sV}', or
`%v', you should have no troubles).
On the bright side, you should have plenty of time to do this before
all support for the old format strings is removed from CVS, so you can
just put up with the deprecation warnings for awhile if you like.
Info Catalog
(cvs.info.gz) commit files
automatically generated byinfo2html