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

Re: how to get filename parameters in hooks

From: kailash vyas <vyaskr_at_gmail.com>
Date: 2007-07-02 18:29:53 CEST

I was assuming that the revision of each file starts from 1,2...
But i just found out that the revisioning of files is incremented globally
so there is no chance of that error. sorry my mistake. thank you very much
for your help. this will work for me.

Best Regards,
Kailash

On 02/07/07, Andy Levy <andy.levy@gmail.com> wrote:
>
> On 7/2/07, kailash vyas <vyaskr@gmail.com> wrote:
> > But that might give me multiple files with the same revision number. Is
> > there a way which gives me the latest file which was commited using
> svnlook.
> > I found in the docs that you can use --transaction (-t) for getting
> > information about particular transaction but can i get the transaction
> id in
> > hook scripts.
>
> svnlook changed tells you all the files that were changed in that
> revision. Presumably, that's what you want - you can parse the output
> of svnlook to find the item(s) you want. You already have the revision
> number in your post-commit (at least, you stated that you do). There
> is no "latest file which was committed" - all files in a commit
> happen, or they don't, and there is no order guaranteed.
>
> So, your hook script fires on each commit, it runs svnlook changed to
> get a list of the files which were changed (which will always be the
> "latest" revision at the time of the commit because of the
> transactional nature of the system), you parse that to find what
> you're looking for, and then take the appropriate action.
>
> What am I missing?
>
> > On 02/07/07, Andy Levy <andy.levy@gmail.com> wrote:
> > > On 7/2/07, kailash vyas <vyaskr@gmail.com> wrote:
> > > > Hi
> > > >
> > > > I am new to subversion and wanted some help regarding usage of
> hooks.
> > > > I have to export the project filename to some remote location after
> > > > commiting.
> > > > But i am not able to get filename and path of the file commited.
> > > > I get the repository name and revision using post-commit but dont
> know
> > how
> > > > to get the filename.
> > >
> > > svnlook changed <repository_path> -r <revision_num> will list all
> > > items which were changed in that revision.
> > >
> >
> >
>
Received on Mon Jul 2 18:29:56 2007

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.