>

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.al...@sword-ciboodle.com]
> Sent: 06 September 2010 11:40
> To: users@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

Reply via email to