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.
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jul 2 17:58:46 2007