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

RE: restricting tags

From: Rob Hubbard <Rob.Hubbard_at_celoxica.com>
Date: 2006-09-06 14:33:26 CEST

Well, it's not a great answer, but...

I think that the information you want can be accessed by parsing the output from
        svnlook diff
on the transaction in the pre-commit script.

The lines you'll be interested in will be something like
        Copied: projectname/tags/newtag (from rev 1234, anotherproject/trunk)
(see <http://svnbook.red-bean.com/en/1.2/svn.ref.svnlook.c.diff.html>).

Other users may have better suggestions. I don't know if you can get at the information more easily via
        svnlook changed
or
        svnlook dirs-changed

I'm not sure that the output from svn/svnlook diff is *strictly* parsable, as I think it's possible for such lines to appear in "Property changes" lines. (But I'm prepared to be persuaded on that one.)

It may be good enough for you to just naively grep the lines in an unstructured way. (That could lead to false rejections by unlikely coincidence; but I don't think the worse, converse problem of false acceptances would occur.)

I hope that helps.

If anyone has any information on the correct parsing algorithm, I'd be interested to know. I can see how to use the "---"/"+++"/"@@"/etc lines to traverse the file differences. However, it looks as though the "Property changes" sections could upset things - I don't see what definitively flags the end of those sections.

It's a pity that (as at SVN 1.2.3 anyway - it may have changed in more recent versions) you can't do this:
        svnlook log --quiet --verbose
or
        svnlook log --xml
to more easily extract just the file-level changes.

Rob.

-----Original Message-----
From: ESSI - Billie H. Cleek [mailto:bcleek@essystemsinc.com]
Sent: 05 September 2006 15:39
To: users@subversion.tigris.org
Subject: restricting tags

We have several subversion repositories: one for each of our clients.
Each client can have multiple projects. I would like to create a
pre-commit hook that will prevent that could detect when the source and
destination projects are not the same, but as far as I can tell the
pre-commit hook can only tell 1) that an ADD operation is being done,
and 2) the destination of the file being added. There does not seem to
be a way to tell what the source of a copy is. Is it possible to do
what I want to do, and can anyone point me in the right direction?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

_____________________________________________________________________
This message has been checked for all known viruses by the MessageLabs Virus Scanning Service, on behalf of Celoxica Ltd.

This email and any files transmitted with it are confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed. If you have received
this in error, please contact the sender and delete the material
immediately. Whilst this email has been swept for viruses, you
should carry out your own virus check before opening any
attachment. Celoxica Ltd accepts no liability for any loss or
damage which may be caused by software viruses or interception
or interruption of this email.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Sep 6 14:35:48 2006

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.