You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tim Toolan <to...@ele.uri.edu> on 2006/03/31 13:12:52 UTC

svn log --limit 1 -r 1:HEAD url returns two log entries

When using the log function, with the --limit option and the --revision option,
where the revisions are ascending, it returns one more entry than requested. 
For instance the command:

 svn log -r 1:HEAD --limit 1 file:///path_to_repository 

will return two log entries, where it should only return one.  Descending
revisions, such as:

 svn log -r HEAD:1 --limit 1 file:///path_to_repository

work properly.

Has anyone else seen this behavior?  I am using version 1.2.3 of subversion. 

The reason for using log -r 1:HEAD --limit 1, is that when viewing a directory
listing in a Subversion viewer like Chora, it shows the last log entry for each
file.  For sub-directories, the first log entry is usually more informative
than the last, since it will probably be a description of why the directory was
created.

Tim




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

Re: svn log --limit 1 -r 1:HEAD url returns two log entries

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 3/31/06, Tim Toolan <to...@ele.uri.edu> wrote:
>
> When using the log function, with the --limit option and the --revision option,
> where the revisions are ascending, it returns one more entry than requested.
> For instance the command:
>
>  svn log -r 1:HEAD --limit 1 file:///path_to_repository
>
> will return two log entries, where it should only return one.  Descending
> revisions, such as:
>
>  svn log -r HEAD:1 --limit 1 file:///path_to_repository
>
> work properly.
>
> Has anyone else seen this behavior?  I am using version 1.2.3 of subversion.
>
> The reason for using log -r 1:HEAD --limit 1, is that when viewing a directory
> listing in a Subversion viewer like Chora, it shows the last log entry for each
> file.  For sub-directories, the first log entry is usually more informative
> than the last, since it will probably be a description of why the directory was
> created.

It seems to work fine here, but I do believe there was an off by one
bug in that code at some point.  Try with 1.3.0 and see if that fixes
it for you.

-garrett

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