You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Havlovick, Ron" <rh...@curtisswright.com> on 2014/03/14 18:15:15 UTC

svnhook question

I hope I am not posting this to the group incorrectly.
I got thrown into this by my boss and so now I am just beginning to do some homework.

Not asking how to do it, just if ya'll think it can be done.

When the last person commits their files into svn,  post svnhook I believe, an asci file will be created or written to, which contains the revision number of that last svn commit.
This is for a fpga and I want the svn revision number to be within the FPGA. When the revision register is read, it agrees with the svn revision number.

Not how to do it. Is it possible?

Thanks

Ron g. Havlovick



_______________________________________________________________________
This e-mail and any files transmitted with it are proprietary and intended solely for the use of the individual or entity to whom they are addressed. If you have reason to believe that you have received this e-mail in error, please notify the sender and destroy this email and any attached files. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the Curtiss-Wright Corporation or any of its subsidiaries.  Documents attached hereto may contain technology subject to government export regulations. Recipient is solely responsible for ensuring that any re-export, transfer or disclosure of this information is in accordance with applicable government export regulations.  The recipient should check this e-mail and any attachments for the presence of viruses. Curtiss-Wright Corporation and its subsidiaries accept no liability for any damage caused by any virus transmitted by this e-mail.

Re: svnhook question

Posted by Henrik Carlqvist <hc...@poolhem.se>.
On Fri, 14 Mar 2014 17:15:15 +0000
"Havlovick, Ron" <rh...@curtisswright.com> wrote:
> This is for a fpga and I want the svn revision number to be within the
> FPGA. When the revision register is read, it agrees with the svn
> revision number.
> 
> Not how to do it. Is it possible?

It seems to me as if you are looking for the $GlobalRev$ keyword mentioned
at this page:
http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html

But unfortunately that keyword does not exist. You will probably need some
kind of script that calls svnversion. You could use that script to alter
some file before commit or you could use the script to put the output from
svnversion into the binary when compiling your software.

regards Henrik

Re: svnhook question

Posted by Johan Corveleyn <jc...@gmail.com>.
Op 15-mrt.-2014 04:08 schreef "Andreas Stieger" <an...@gmx.de>:
>
> Hello,
>
> On 14/03/14 17:15, Havlovick, Ron wrote:
> > When the last person commits their files into svn,  post svnhook I
> > believe, an asci file will be created or written to, which contains the
> > revision number of that last svn commit.
>
> Contrary to what Henrik wrote.. just ad a post-commit hook with
> something like this:
>
> GNU/Linux:
>
> #!/bin/sh
> REPOS="$1"
> REV="$2"
> echo "$REV" > /path/to/file.txt
>
> Windows:
>
> SET REPOS-PATH=%1
> SET REV=%2
> echo %REV% > C:\Path\to\file.txt
>

Careful: this does not guarantee that file.txt contains the last committed
revision. The post-commit hook can be running concurrently for multiple
commits, so there is a race here.

Johan

Re: svnhook question

Posted by Andreas Stieger <an...@gmx.de>.
Hello,

On 14/03/14 17:15, Havlovick, Ron wrote:
> When the last person commits their files into svn,  post svnhook I
> believe, an asci file will be created or written to, which contains the
> revision number of that last svn commit.

Contrary to what Henrik wrote.. just ad a post-commit hook with
something like this:

GNU/Linux:

#!/bin/sh
REPOS="$1"
REV="$2"
echo "$REV" > /path/to/file.txt

Windows:

SET REPOS-PATH=%1
SET REV=%2
echo %REV% > C:\Path\to\file.txt

With kind regards,
Andreas Stieger