[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

How to discover which files are tagged or branced in a hook script?

From: Bo Berglund <bo.berglund_at_gmail.com>
Date: Sat, 16 Dec 2017 17:29:59 +0100

If there is a commit to a tag operation, how can I find out which is
the tag and which files carry that tag?

I am trying to use svnlook for this on a repository converted from CVS
when investigating how to create a commit hook that will give me the
information about the files as well as the tag name.

But when I test sityh svnlook info on a revision which is the tag
commit I only see the tag as a log message comment created by cvs2svn
during conversion:

"This commit was manufactured by cvs2svn to create tag
'TagHTMLAdded3'."

When an actual tagging operation as opposed to the cvs2svn conversion
commit is done on the repository and the post_commit hook fires, how
can I know that the commit was for a tag/branch operation and which
tag/branch was involved?
And which files were tagged/branched?

I am working to adapt my CVSMailer program that sends out email to the
developer team when a change has been committed. So I need to just dig
out this information and then plug it into the existing mailer
program. (Well, maybe a bit more work, but basically that is it.)

Follow-up
---------------
I have tried various ways to get at the information but failed so far,
the best I could do is to use
svnlook changed -r <revision> <repository>
but then I have to parse the returned path looking for keyword /tags/
and grab the bit following this keyword:

D:\>C:\Programs\Subversion\svnlook changed -r 792 D:\SVN\bosse
A XMLTV/tags/Rel_XMLTV2MEI_1-0-2-56_2011-02-09/

If I use "info" I am getting the response below but than the tag name
is embedded in the log message and cannot be relied upon:

D:\>C:\Programs\Subversion\svnlook info -r 792 D:\SVN\bosse
cvs2svn
2011-07-05 09:10:25 +0200 (ti, 05 jul 2011)
91
This commit was manufactured by cvs2svn to create tag
'Rel_XMLTV2MEI_1-0-2-56_2011-02-09'.

And using "changed" is basically also non-working except for parsing a
supplied path:

D:\>C:\Programs\Subversion\svnlook changed -r 792 D:\SVN\bosse
--copy-info
A + XMLTV/tags/Rel_XMLTV2MEI_1-0-2-56_2011-02-09/
    (from XMLTV/trunk/:r791)

And none of these show the *files* affected by the tagging....

So I tried to use the following command:

D:\>C:\Programs\Subversion\svnlook tree -r 792 D:\SVN\bosse --show-ids
--full-paths

But this lists ALL files in the *whole* repository, not even limiting
to the files in the module that was tagged by r792 even though the
documentation shows otherwise.

The repository is organized into modules (top level directories) as
was the CVS repository. These are each containing a separate project
non-related to the other projects except for the department managing
those projects.

When the whole *project* is tagged I want to be able to list all the
involved files even though they are not modified themselves.

How can this be accomplished? svnlook seems not to be able to do it...

-- 
Bo Berglund
Developer in Sweden
Received on 2017-12-16 17:30:30 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.