[Top][All Lists]

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

commitinfo, loginfo: Current file path

From: jt2190
Subject: commitinfo, loginfo: Current file path
Date: Tue, 12 Feb 2008 12:26:40 -0800 (PST)
User-agent: G2/1.0

I have configured my 1.12.9 installation of CVS to call two third-
party provided scripts.

The first script is called from commitinfo and simply writes its first
argument in a temp file. It turns out that this first argument is the
path to the file being checked in.

The second script is called from loginfo, and has logic that reads the
path stored in the temp, and compares it with the value of %{}, which
I understand is the full path to the cvs module.

If a user checks in a file in the root of the cvs module, the two
paths are equal. If, however, they check in a file in a subdirectory,
the two paths don't match. (This makes sense, if %{} always expands to
the path to the module.)

Here are some examples:

File                commitinfo               loginfo %{}
----                ----------               -----------
foo.txt             module_name/             module_name/
etc/bar.txt         module_name/etc/         module_name/
var/etc/baz.txt     module_name/etc/baz      module_name/

The scripts expect the two paths to always be the same. Obviously, %{}
won't work when calling the script from loginfo. Is there a value I
can use instead that will expand to the correct path?

James Tikalsky
Providence, RI

reply via email to

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