You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by ramit <ra...@pando.com> on 2005/07/12 00:31:53 UTC

svn log issue..

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.

example:

User X commits to head.

cd /path/to/head
svn up
svn log -r BASE /path/to/head 

outputs:

------------------------------------------------------------------------
r#### | <UserID> | <The date of the last checkin is listed here>| 1 line

<Log Message>
------------------------------------------------------------------------

For the branch:

cd /path/to/branch
svn up (Nothing acutally updates as there have been no new changes here)
svn log -r BASE /path/to/branch

outputs:

------------------------------------------------------------------------

Just a single line with no actual revision details.

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?

Thanks in Advance!

-r

-- 
Ramit Hora <ra...@pando.com>
Pando Networks
QA and Release Manager


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

Re: svn log issue..

Posted by ramit <ra...@pando.com>.
Thanks, that really clears things up. Appreciate your help!

-r

On Tue, 2005-07-12 at 09:54 -0400, Dominic Anello wrote:

<snip>

> 
> 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
> copy.
> 
> Example:
> [danello@lynx ~/src/ec/trunk]$ svn up
> At revision 4512.
> 
> [danello@lynx ~/src/ec/trunk]$ svn log -r BASE
> ------------------------------------------------------------------------
> 
> [danello@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-4.8.0.1-post-upgrade/SeeBeyond3x/monk_scripts/common/FILE/Collab/crTRNSIRSFileMask.tsc
> ------------------------------------------------------------------------
> 
> [danello@lynx ~/src/ec/trunk]$ svnversion -c .
> 2:4497
> 
> 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.
> 
> -Dominic
-- 
Ramit Hora <ra...@pando.com>
Pando Networks
QA and Release Manager


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

Re: svn log issue..

Posted by Dominic Anello <da...@danky.com>.
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.
> 
----8<----
> 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
copy.

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

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

[danello@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-4.8.0.1-post-upgrade/SeeBeyond3x/monk_scripts/common/FILE/Collab/crTRNSIRSFileMask.tsc
------------------------------------------------------------------------

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

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.

-Dominic