subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Archer <Bob.Arc...@amsi.com>
Subject RE: svnversion feature
Date Thu, 07 Jun 2012 17:28:51 GMT
> I am in the process of putting together make files for firmware builds and run
> into an issue that I didn't see addressed in any of the issues lists. One of the
> things I want to do is to tag the SVN revision that a binary was built from onto
> the file name (this was actually requested by manufacturing and I agree with
> their view point). The revision is easy enough to get from svnversion. The
> problem is, that when I run it  in my working directory, inevitably I get a
> mixed revision result, even if I have just committed (something like 3:26).
> While this may be informative to me as a developer, this is not something I
> can embed in a file name. At the same time Make has no ability to extract
> just the part after the colon.
> 
> I see three solutions to this problem:
> 1. create another directory and do a clean checkout of the version I just
> committed. I tried this and it works well. Cumbersome though.
> 2. implement an external tool that runs svnversion and then disassembles
> the result to get the correct number for use in a file name. Ugly, too many
> tools needed already to get every day work done.
> 3. implement an option in svnversion that makes it to only spit out the
> highest revision number (no colon). Alternatively, the colon could be
> replaced by any character the user likes. That way something compatible
> with the file system can be chosen. I guess what I meant to say is, it would be
> nice to have control over the format in which svnversion reports the version.
> Thanks for taking the time to read and form an opinion about this.

4. Don't build against a mixed revision? Run svn up prior to doing your build, or as the first
step.

BOb

Mime
View raw message