You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Vlad Skvortsov <vs...@73rus.com> on 2007/08/06 22:59:10 UTC

print out what special revision names resolve to

Hi!

I wish there was a way to figure out which revision number was 
substituted in place of a special revision keyword (e.g. HEAD). For 
example, when doing a merge one could invoke svn as:

$ svn merge -r1234:HEAD $BRANCH

After the command finishes there is no way to know what HEAD was at the 
time of execution (for example, to write the number down to a log). Of 
course one could a) look the number up in 'svn log' but there is a race 
condition here (someone could commit a new revision before 'svn merge' 
was invoked); b) invoke 'svn merge' with specific revision number but 
this defeats the whole purpose of having keywords like 'HEAD'.

Are there any other ways I'm missing?

May be svn should print out the operating revision range? E.g.,

$ svn merge -r1234:HEAD $BRANCH
...
A   some/file
*    revisions 1234:2345

For consistency (and machine-parseability) 'svn up' could go the same way:
$ svn up
...
U    another/one
*     revisions 2345:2347

(I understand that with mixed-revision working copies the first number 
may not be meaningful)

Here I use '*' to denote an AV pair, where attribute and value are 
space-separated.

Comments?

-- 
Vlad Skvortsov, vss@73rus.com, http://vss.73rus.com

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

Re: print out what special revision names resolve to

Posted by Ben Collins-Sussman <su...@red-bean.com>.
On 8/6/07, Vlad Skvortsov <vs...@73rus.com> wrote:

> A   some/file
> *    revisions 1234:2345

In svn 1.5, 'svn merge' in fact already does this:  it tells you
exactly which revisions its merging.

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