[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: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: Mon, 6 Sep 2010 11:51:42 +0100

>

Linedata Limited
Registered Office: 85 Gracechurch St., London, EC3V 0AA
Registered in England and Wales No 3475006 VAT Reg No 710 3140 03

-----Original Message-----

> From: Campbell Allan [mailto:campbell.allan_at_sword-ciboodle.com]
> Sent: 06 September 2010 11:40
> To: users_at_subversion.apache.org
> Cc: Giulio Troccoli; 'Daniel Becroft'
> Subject: Re: Transaction and revision numbers
>
> 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.
>

I don't understand what you're saying here. However I have decided to follow another approach.

The calling script will pass a hash specifying either the transaction or the revision. Something like

SVN::get_author({ revision => $rev }) or SVN::get_author({ transaction => $txn })

So, get_author will know what to do.

Giulio
Received on 2010-09-06 12:52:23 CEST

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.