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

Re: pre-commit hook for project version.

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Tue, 1 Apr 2008 12:40:23 -0700

On Tue, Apr 1, 2008 at 11:29 AM, uprooter <uprooter_at_gmail.com> wrote:

> Hi john and thank you for your quick reply.
>
>
>
> > > Is there a way to modify that file from pre-commit without
> incrementing
> > > the revision?
> >
> > No, you must not alter file contents in the pre-commit hook (because
> > then it would not be the same data that the client just sent).
> Well, the client would not commit the "version.h" file. I can be sure
> about
> that. I can even check it in the hook.
>
> > > Any other ideas on how to implement this on the server?
> >
> > What's wrong with one of these methods?
>
> > http://subversion.tigris.org/faq.html#version-value-in-source
>
> All of these methods are imlemented in the client side.
> I have a C# gui developer running visual studio 2005
> socket programmer developing in GNU make
> java web programmer developing in NetBeans
> A solution in the client side would be a hassle for me.
>
> What do you suggest ?
>

First let me say that if there is a way to do it on the server without
incrementing the revision (2 revision bump as you said), then I don't know
how to do it.

That said, I think this is a client side implementation, whether it is a
hassle or not. I suppose your team should have a build system -- a makefile,
an ant file (or two) etc. Either you should incorporate the suggestions in
the link (run 'svnversion' and write it into a file etc) in each of these
build files or you should have a driver build file that drives each build
file. And the 'svnversion' thing can be placed only into the driver build
file.

Regards,
-Hari
Received on 2008-04-01 21:40:49 CEST

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