info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

odd quoting for "${=uservar}" in commitinfo vs loginfo


From: Mark D. Baushke
Subject: odd quoting for "${=uservar}" in commitinfo vs loginfo
Date: Mon, 22 Jan 2001 01:56:19 -0800

I just noticed a bit of an inconsistency in how cvs treats the
expansion of tokens in commitinfo and loginfo

A commitinfo line of
ALL     $CVSROOT/CVSROOT/envsetup testenv="${=testenv}"

will end up running the command with each separate word in the ${=testenv}
expanded as a separte argument, while the same line in a loginfo will keep
the ${=testenv} expansion as a single argument.

I suspect this is a bug in how commitinfo filter lines are hacked by
the precommit_proc() in commit.c parsed and sent to run_setup() versus
how loginfo uses logfile_write to parse its filter lines and use
run_popen().

It might be useful to be a bit more consistent about filter line
expansion.

        Thanks,
        -- Mark

% cvs -s testenv='hello world ' ci -m test foo
/homes/mdb/test-vars-cvs/CVSROOT/envsetup ARGS=('testenv="hello' 'world' '"' 
'/homes/mdb/test-vars-cvs/CVSROOT' 'foo');
Checking in foo;
/homes/mdb/test-vars-cvs/CVSROOT/foo,v  <--  foo
new revision: 1.14; previous revision: 1.13
done
/homes/mdb/test-vars-cvs/CVSROOT/envsetup ARGS=('testenv=hello world ');
cvs server: Rebuilding administrative file database




# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       commitinfo
#       loginfo
#       envsetup
#
echo x - commitinfo
sed 's/^X//' >commitinfo << 'END-of-commitinfo'
XALL    $CVSROOT/CVSROOT/envsetup testenv="${=testenv}"
END-of-commitinfo
echo x - loginfo
sed 's/^X//' >loginfo << 'END-of-loginfo'
XALL    $CVSROOT/CVSROOT/envsetup testenv="${=testenv}"
END-of-loginfo
echo x - envsetup
sed 's/^X//' >envsetup << 'END-of-envsetup'
X#!/usr/local/bin/perl
X
Xprint "$0 ARGS=('".join("' '", @ARGV)."');\n";
X
END-of-envsetup
exit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]