On 16.12.2017 17:29, 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?
We'll have to dispel some misconceptions. Subversion's data model is
significantly different from CVS's. Tags (and branches) are not
properties of files, they're just (sub)trees within the repository.
Creating a tag or a branch is exactly the same as copying a directory:
the only thing that happens at the repository level is that a new
version of the directory is created.
> 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.
The /path/ of the file implies which branch or tag it belongs to. There
is no other information you need.
> 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
You should also see the name of the tag in the path of the file.
> 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?
See above; you'll see which path was created.
The structure of the repository is entirely free-form. The
trunk/branches/tags convention is exactly that: a convention, nothing
more. Of course it helps to pick a convention and stick with it.
> 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.)
I'd very strongly recommend to use one of the existing Subversion mailer
scripts. There's one in the Subversion repository:
but there are others. You can certainly use this script to see how it
gathers commit info from the repository.
Received on 2017-12-17 01:22:20 CET