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

Re: Transaction and revision numbers

From: Campbell Allan <campbell.allan_at_sword-ciboodle.com>
Date: Mon, 6 Sep 2010 11:40:29 +0100

On Monday 06 Sep 2010, Giulio Troccoli wrote:
> The class will be used by both the pre- and post-commit hooks, hence the
> need to distinguish between transaction or revision. And I would like to do
> it by just looking at the transaction/revision number.
> I think transactions are in the format of 9999999-9 (where 9 is any single
> number) while revisions are in the format 99999. If that's true, then I can
> check for the dash and I'm done. Can anyone confirm it to me?
> Giulio

I'm not sure about the transaction number always having a dash but another
alternative approach could be to check the script name. So long as the script
is a link from post-commit/pre-commit then it's name will be different and
can be used to distinguish the two uses. I've used this trick so that one
shell script logs changes from a post-commit, post-revprop-change (which also
has different parameters) and CVS.

Sword Ciboodle is the trading name of ciboodle Limited (a company 
registered in Scotland with registered number SC143434 and whose 
registered office is at India of Inchinnan, Renfrewshire, UK, 
PA4 9LH) which is part of the Sword Group of companies.
This email (and any attachments) is intended for the named
recipient(s) and is private and confidential. If it is not for you, 
please inform us and then delete it. If you are not the intended 
recipient(s), the use, disclosure, copying or distribution of any 
information contained within this email is prohibited. Messages to 
and from us may be monitored. If the content is not about the 
business of the Sword Group then the message is neither from nor 
sanctioned by us.
Internet communications are not secure. You should scan this
message and any attachments for viruses. Under no circumstances
do we accept liability for any loss or damage which may result from
your receipt of this email or any attachment.
Received on 2010-09-06 12:41:31 CEST

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