You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Campbell, Matthew A" <Ma...@Relizon.com> on 2004/07/14 16:25:46 UTC

Most recent log message?

I strongly suspect I'm being stupid, dense, or both - but I cannot figure
this out.  I've gone through the online version of the book and not found
and answer.  I suspect that this is a (v)FAQ, but searching the archive at
http://www.contactor.se/~dast/svn/ didn't help (I had difficulty
constructing a useful search query).

Is there a way using command-line SVN to retrieve *only* the most recent log
info for a given URL?  (I'm pretty sure that for a working copy, 'svn log -q
-rBASE' would work, however the approach I need should be able to handle
either case.)  'svn log -q -rHEAD URL' only works if you have the happy
coincidence where the URL was actually the subject of the last checkin.
I've tried being clever with using dates as revisons (specifying future
dates) but there seem to be some circumstances where this works, and others
where it does not.

Right now I am accomplishing the same end result using pipelines to filter
out a total log dump (which could be potentially very large on a *very* busy
project), but it seems to me this kind of situation would be fairly common,
and supported by a revision keyword - since HEAD doesn't work, perhaps
something like "youngest"...  

This is the "solution" I'm currently using to get by...
svn log -q ${URL} | grep -v ^- | head -1


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

Re: Most recent log message?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Ben Collins-Sussman wrote:

> On Wed, 2004-07-14 at 11:46, Garrett Rooney wrote:
> 
> 
>>There currently is no way to do this, although I've got some 
>>work-in-progress patches to implement support for a --limit argument 
>>that will allow you to limit the number of log entries printed (svn log 
>>-l 5 $URL would print the last 5 log entries).  Hopefully I'll get a 
>>chance to finish them up soon.
> 
> 
> Why not just run 'svn log -rHEAD URL', where URL is the root of the
> repository?  I do that all the time.

What if you want the last change for a given project within a 
repository?  Picture a repository with multiple top level projects. 
HEAD is not necessarily what you're looking for.

-garrett

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

Re: Most recent log message?

Posted by Ben Collins-Sussman <su...@collab.net>.
On Wed, 2004-07-14 at 11:46, Garrett Rooney wrote:

> There currently is no way to do this, although I've got some 
> work-in-progress patches to implement support for a --limit argument 
> that will allow you to limit the number of log entries printed (svn log 
> -l 5 $URL would print the last 5 log entries).  Hopefully I'll get a 
> chance to finish them up soon.

Why not just run 'svn log -rHEAD URL', where URL is the root of the
repository?  I do that all the time.



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

Re: Most recent log message?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Campbell, Matthew A wrote:

> I strongly suspect I'm being stupid, dense, or both - but I cannot figure
> this out.  I've gone through the online version of the book and not found
> and answer.  I suspect that this is a (v)FAQ, but searching the archive at
> http://www.contactor.se/~dast/svn/ didn't help (I had difficulty
> constructing a useful search query).
> 
> Is there a way using command-line SVN to retrieve *only* the most recent log
> info for a given URL?  (I'm pretty sure that for a working copy, 'svn log -q
> -rBASE' would work, however the approach I need should be able to handle
> either case.)  'svn log -q -rHEAD URL' only works if you have the happy
> coincidence where the URL was actually the subject of the last checkin.
> I've tried being clever with using dates as revisons (specifying future
> dates) but there seem to be some circumstances where this works, and others
> where it does not.
> 
> Right now I am accomplishing the same end result using pipelines to filter
> out a total log dump (which could be potentially very large on a *very* busy
> project), but it seems to me this kind of situation would be fairly common,
> and supported by a revision keyword - since HEAD doesn't work, perhaps
> something like "youngest"...  
> 
> This is the "solution" I'm currently using to get by...
> svn log -q ${URL} | grep -v ^- | head -1

There currently is no way to do this, although I've got some 
work-in-progress patches to implement support for a --limit argument 
that will allow you to limit the number of log entries printed (svn log 
-l 5 $URL would print the last 5 log entries).  Hopefully I'll get a 
chance to finish them up soon.

-garrett

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