Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-12

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

3 messages · 1 person · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

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 info about the files as well as the tag name.
But when I test on a revision that is the tag commit I only see the tag in the info response as a log message created by cvs2svn during conversion:

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

When an actual tagging operation 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 develper 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.)

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote
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 have tried various way 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

Reply by email

Bo Berglund
to Bo Berglund: If there is a commit to a tag operation, how can I find out which is the tag and which…
Bo Berglund wrote
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'm sorry for spamming OT questions here!
I inadvertently posted to the *wrong* newsgroup on GMane! It should be posted to subversion.users instead.
Both groups are open while I am struggling with Lazarus to get the hook program working.

So disregard any messages on this subject here.

Bo Berglund Developer in Sweden

Reply by email