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

workaround for $WorkingRevision$ ?

From: Bill Comisky <bcomisky_at_pobox.com>
Date: 2003-06-18 19:39:34 CEST

I have a repository of source code for an interpreted (not-compiled)
language, in this case Matlab m-files. It's very useful for me to be able
to record the "working revision" in output files generated by this code.
For example if an incompatiblity in the output file format is introduced,
I can determine what revision it was created with and backtrack.

I've been reading the archives about a $WorkingRevision$ keyword (which
would be perfect for what I want), and the concerns about mixed-revisions
and work arounds by parsing "svn info" at build time. But since I don't
have to compile, I can't use a Makefile as a good way to be sure the
$WorkingRevision$ gets updated in some file.

I was hoping someone had a clever idea of a workaround for my scenario.
I've thought of:

- Using tags extensively and parsing $HeadURL$. The problem here is that
this is needed in a development environment, tagging every commit doesn't
seem realistic.

- Just making everyone run another script to parse "svn info" and dump the
WorkingRevision after every "svn update", "svn checkout", "svn export",
other? This relies on people remembering an extra step, and is bound to
fail sometimes. Maybe have special commands that do everything in one
step? But I don't want to obfuscate the svn command line interface.

- Kludging some server side (pre,post?)-commit script to automatically
update a file containing the WorkingRevision. Not sure exactly how I
would do this. An update & commit of my WorkingRevision file? So I'd
advance 2 revision numbers on every commit? And I'd have to make sure not
to get stuck in a infinite recursive cycle. Yuck. The only thing nice
here is that I'd have the WorkingRevision on update, checkout, export.
Hopefully I overlooked something nice and simple, and someone will fill me


Bill Comisky
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 18 19:40:29 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.