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

Re: svn log issue..

From: Dominic Anello <danello_at_danky.com>
Date: 2005-07-12 15:54:46 CEST

On 2005-07-11 20:31:53 -0400, ramit wrote:
> Hi,
> I'm currently inserting the svn revision number in our resource files
> during the compile process using the command below + some perl munging.
> All examples are using SVN 1.1.4.
> svn log -r BASE /path/to/my/tree
> This worked fine for a while however, we branched recently and are
> experiencing an odd problem.
> When someone commits to the head there is no revision number present in
> the message for branch and vice-versa.
> The same occurs in reverse if User X had committed to the Branch. My
> question.. is this a limitation of SVN, a bug, or am I doing something
> wrong? Is there any other way to reliably get the rev. of the tree on
> the filesystem?

This is not a bug. When you update your branch, the BASE revision
becomes the same as HEAD. If the commit that created HEAD doesn't touch
your branch, then log will not return any data for your command. You're
basically asking svn "What happened in rBASE on this branch?" The
answer in this case happens to be: nothing!

You should probably be using the svnversion tool with the -c option.
This returns the earliest and latest committed revision in a working

[danello@lynx ~/src/ec/trunk]$ svn up
At revision 4512.

[danello@lynx ~/src/ec/trunk]$ svn log -r BASE

[danello_at_lynx ~/src/ec/trunk]$ svn log -q -v -r4512 http://lynx/ec-svn
r4512 | jcozzens | 2005-07-12 09:33:08 -0400 (Tue, 12 Jul 2005)
Changed paths:
   M /branches/eCommerce/4.8.0.x/4.8.0-

[danello@lynx ~/src/ec/trunk]$ svnversion -c .

I this example, svn log of BASE=4512 on trunk returns no data because
4512 didn't touch trunk. When I run svnversion, I get 2:4497. 2 is the
commit revision of the least recently comitted file. 4497 is the commit
revision of the most recently comitted file.


  • application/pgp-signature attachment: stored
Received on Tue Jul 12 15:56:51 2005

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

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