You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrick Olson <Ga...@Aceva.com> on 2004/02/18 07:34:28 UTC

Idea for specifying revisions

Has anyone considered allowing "arithmetic" as part of the "-r" option?

For example:

$ svn log -r HEAD:HEAD-10 foo
$ svn log -r 123:123+5 bar

I was thinking it would be most useful if the "arithmetic" was based on
actually changed revisions rather than simply revision numbers.  Thus,
the examples above would mean "show me the last 10 changes to foo", and
"show the first five changes to bar following revision 123" (which would
*not* be the same as -r 123:128).

Is there an alternative way to ask the first question?

I often want to ask "what were the last X changes to Y", but this
actually seems a bit difficult.  I have to find out what the head
revision is, and start subtracting, but since revision numbers are
global for the repository, I can't just subtract X from the head
revision.  

Of course I can just use the default of -r HEAD:1, and then use head,
but the log messages are of arbitrary size, and if I have a large number
of revisions (suppose I had tens of thousands of revisions), HEAD:1
starts to look a bit extreme.

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


Re: Idea for specifying revisions

Posted by kf...@collab.net.
"Garrick Olson" <Ga...@Aceva.com> writes:
> Has anyone considered allowing "arithmetic" as part of the "-r" option?
> 
> For example:
> 
> $ svn log -r HEAD:HEAD-10 foo
> $ svn log -r 123:123+5 bar
> 
> I was thinking it would be most useful if the "arithmetic" was based on
> actually changed revisions rather than simply revision numbers.  Thus,
> the examples above would mean "show me the last 10 changes to foo", and
> "show the first five changes to bar following revision 123" (which would
> *not* be the same as -r 123:128).
> 
> Is there an alternative way to ask the first question?
> 
> I often want to ask "what were the last X changes to Y", but this
> actually seems a bit difficult.  I have to find out what the head
> revision is, and start subtracting, but since revision numbers are
> global for the repository, I can't just subtract X from the head
> revision.  

Have you tried 'svn log -q PATH_OR_URL' ?

(I agree that some sort of new -r syntax could be an improvement, just
suggesting a workaround for now.  And am avoiding the larger question
only because have other stuff on the front burners right now, not
because I think it's unworthy.)

-Karl

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

Re: Idea for specifying revisions

Posted by Chia-Liang Kao <cl...@clkao.org>.
The limit N changes option is very useful, as in perforce and svk.
However with the current RA API there isn't an easy way to allow this.

I implemented it with fs node_history tracking to find the boundry for
actual log display.

Cheers,
CLK

On Tue, Feb 17, 2004 at 11:34:28PM -0800, Garrick Olson wrote:
> I was thinking it would be most useful if the "arithmetic" was based on
> actually changed revisions rather than simply revision numbers.  Thus,
> the examples above would mean "show me the last 10 changes to foo", and
> "show the first five changes to bar following revision 123" (which would
> *not* be the same as -r 123:128).

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