You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Sven Mueller <sm...@leogic.com> on 2004/07/15 12:50:46 UTC

"svn --version" should report revision it was built from on dev (HEAD) builds

Hi.

Just noticed that releases report the revision of the branch they were 
built from, but neither release candidate nor HEAD builds seem to do so.

IMHO, they should.

regards,
Sven

-- 
---------------------[ Ciphire Signature ]----------------------
From: sm@leogic.com signed email body (150 characters)
Date: on 15 July 2004 at 12:50:52 GMT
To:   dev@subversion.tigris.org
----------------------------------------------------------------
: The message above has been secured using Ciphire Mail.
: Verify this signature and download your free encryption
: software at www.ciphire.com. The three garbled lines
: below are the sender's verifiable encoded signature.
----------------------------------------------------------------
00fAAAAAEAAACsffZAlgAAAHIDAAIAAgACACA2A1N0anFAjhISsXqfspQ17ONB+Y
6A9ebgf4EvPUUdWwEAZ8hoc7VVY9dHDJGN9IMnlKpqZgaQgRfmZl6cjXlBQ49Sjv
1mW4C8xvAjwbM3RZ/PcwmVbVnfdlj1PuzJJEOCIg==
------------------[ End Ciphire Signed Message ]----------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "svn --version" should report revision it was built from on dev (HEAD) builds

Posted by Klaus Rennecke <kr...@tigris.org>.
Hmm, please don't get angry if this is a silly idea, but what's wrong with

#ifdef SVN_DEBUG
static const char* _svnid = "$Id$";
#endif

Assuming that a dev build that's to stay any longer than a few minutes 
should be built statically, this would at least allow to get a definite 
profile of what version of .c files was used to create the object.

ident(1) is your friend :-)

/Klaus



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "svn --version" should report revision it was built from on dev (HEAD) builds

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-07-16 at 11:50, Ben Reser wrote:
> And like I said, to be accurate you'd have to regenerate svn_version.h
> in every rebuild.  Run make at the top level in a wc, then touch
> subversion/include/svn_version.h, run make again, watch the whole thing
> rebuild from scratch.  

We could add a new header file with just the svnversion output, include
it only in the file(s) which need it, and use a Makefile hack to only
update it when it changes.

Not sure if it's worthwhile, but it doesn't mean having to rebuild all
of svn each time you run make.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "svn --version" should report revision it was built from on dev (HEAD) builds

Posted by Ben Reser <be...@reser.org>.
On Fri, Jul 16, 2004 at 01:59:34PM +0100, Andy Whitcroft wrote:
> Hmm, why not include the whole output from the svnversion . in the top
> level?  If they are a fool and have a mixed version then at least it will
> be obvious in the output.  If they are not then it will be a useful
> version.  Either way it is _obvious_ from that whether it is useful or not,
> including whether its modified for instance?

Umm you do realize mixed revisions are very very common.  After every
commit you have a mixed revision working copy.  

And like I said, to be accurate you'd have to regenerate svn_version.h
in every rebuild.  Run make at the top level in a wc, then touch
subversion/include/svn_version.h, run make again, watch the whole thing
rebuild from scratch.  

The cost of forcing an entire rebulid is simply not worth it.  People
building out of working copies are likely to either know what rev
they're using or can run svnversion on their working copy to find out.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "svn --version" should report revision it was built from on dev (HEAD) builds

Posted by Andy Whitcroft <ap...@shadowen.org>.
--On 15 July 2004 09:48 -0700 Ben Reser <be...@reser.org> wrote:

> On Thu, Jul 15, 2004 at 02:50:46PM +0200, Sven Mueller wrote:
>> Just noticed that releases report the revision of the branch they were 
>> built from, but neither release candidate nor HEAD builds seem to do so.
>> 
>> IMHO, they should.
> 
> In the case of RC tarballs I suppose we could include this.  However,
> our documentation on what we put in that field says we don't.  I'm not
> sure if there's a reason for that or not.
> 
> However, in HEAD builds or any other out of repository build, it is
> impossible to give a single revision that it is build against.  The
> working copy could be a mixed revision working copy.  Also in order to
> include this we'd have to update it on every build as someone could
> update a single file.  Which means svn_version.h would be updated and
> tons of things depend upon that so you'd end up rebiulding everything.
> Ultimately, it would be worthless because it wouldn't be an accurate
> reflection of what is in the build because either people would defeat it
> or it just wouldn't work.  We're far better off leaving it out
> so people don't come to believe it is reliable.
> 
> The only time we do that is with tags and if someone builds with a mixed
> working copy of a tag well they're on their own.

Hmm, why not include the whole output from the svnversion . in the top
level?  If they are a fool and have a mixed version then at least it will
be obvious in the output.  If they are not then it will be a useful
version.  Either way it is _obvious_ from that whether it is useful or not,
including whether its modified for instance?

-apw

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: "svn --version" should report revision it was built from on dev (HEAD) builds

Posted by Ben Reser <be...@reser.org>.
On Thu, Jul 15, 2004 at 02:50:46PM +0200, Sven Mueller wrote:
> Just noticed that releases report the revision of the branch they were 
> built from, but neither release candidate nor HEAD builds seem to do so.
> 
> IMHO, they should.

In the case of RC tarballs I suppose we could include this.  However,
our documentation on what we put in that field says we don't.  I'm not
sure if there's a reason for that or not.

However, in HEAD builds or any other out of repository build, it is
impossible to give a single revision that it is build against.  The
working copy could be a mixed revision working copy.  Also in order to
include this we'd have to update it on every build as someone could
update a single file.  Which means svn_version.h would be updated and
tons of things depend upon that so you'd end up rebiulding everything.
Ultimately, it would be worthless because it wouldn't be an accurate
reflection of what is in the build because either people would defeat it
or it just wouldn't work.  We're far better off leaving it out
so people don't come to believe it is reliable.

The only time we do that is with tags and if someone builds with a mixed
working copy of a tag well they're on their own.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org