You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Russ Brown <pi...@gmail.com> on 2005/07/21 16:43:59 UTC

Subversion feature question/request

Hello,

I have a question about a feature that I'd like to see in Subversion. If 
there's already a tool that does this I'll be really happy.

What I want is a command to which I pass a URL, and returns a list of 
all objects that have existed at that path in history along with the 
revisions between which they existed. Effectively, a peg revision lister.

For example, say I create a branch at revision 1000, and delete it at 
revision 1500:

svn cp svn://url/trunk svn://url/branches/x
500 revisions....
svn rm svn://url/trunk svn://url/branches/x

Say I then create another branche with the same name at revision 2000

If I pass this command the path I'd like output akin to the following:

svn <command> svn://url/trunk

500:1000
2000-HEAD

Or something similar. That would make working with peg revisions so much 
easier.

Can this be done already, and if not how hard would it be to add?

Thanks.

-- 

Russell Brown.

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

Re: Subversion feature question/request

Posted by Russ Brown <pi...@gmail.com>.
Christopher Ness wrote:
> On Thu, 2005-07-21 at 17:43 +0100, Russ Brown wrote:
> 
>>svn <command> svn://url/trunk
>>
>>500:1000
>>2000-HEAD
> 
> 
> Did you mean svn://url/branches/x above?  Something seemed off with your
> revision numbers in the original post.  
> 
> I take it you want to pass a URL to the repository and have it return
> the revision ranges that the URL was valid.  For example...
> 
> svn <command> svn://url/trunk [-rX:Y]
> 1:HEAD
> 
> That is assuming the trunk was part of the first import.  I believe
> there is nothing in revision zero so it should never be a peg revision.
> 
> 
>>Or something similar. That would make working with peg revisions so much 
>>easier.
>>
>>Can this be done already, and if not how hard would it be to add?
> 
> 
> svn log -v -r500:1000 svn://url/branches/ | grep x
> 
> This command shows you if the URL you are looking for existed between
> r500 and 1000 as a child of the branches directory.  There is also the
> --stop-on-copy flag for finding when a branch was made.
> 
> Then you need to dig though the logs -- which isn't that hard, just
> search for the URL with a text editor.
> 
> A nice little program could be written with the python or perl bindings
> if you so feel the need.  ;)
> 

Yes, it probably could be scripted, but grepping through logs like that 
is an inexact science, as there's nothing to stop a log message matching 
the string being grepped for and causing a false positive.

I just think that Subversion should provide a way to easily look back at 
the history of a given path. It's easy enough to get at the information 
once you know where it is, it's just not very easy to find it.

It would also be nice to have an API call for doing this. Pass path and 
get array of instances back.

> Cheers,
> Chris


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

Re: Subversion feature question/request

Posted by Christopher Ness <ch...@nesser.org>.
On Thu, 2005-07-21 at 17:43 +0100, Russ Brown wrote:
> svn <command> svn://url/trunk
> 
> 500:1000
> 2000-HEAD

Did you mean svn://url/branches/x above?  Something seemed off with your
revision numbers in the original post.  

I take it you want to pass a URL to the repository and have it return
the revision ranges that the URL was valid.  For example...

svn <command> svn://url/trunk [-rX:Y]
1:HEAD

That is assuming the trunk was part of the first import.  I believe
there is nothing in revision zero so it should never be a peg revision.

> Or something similar. That would make working with peg revisions so much 
> easier.
> 
> Can this be done already, and if not how hard would it be to add?

svn log -v -r500:1000 svn://url/branches/ | grep x

This command shows you if the URL you are looking for existed between
r500 and 1000 as a child of the branches directory.  There is also the
--stop-on-copy flag for finding when a branch was made.

Then you need to dig though the logs -- which isn't that hard, just
search for the URL with a text editor.

A nice little program could be written with the python or perl bindings
if you so feel the need.  ;)

Cheers,
Chris
-- 
Wireless Group
McMaster University

summer
08:44:38 up 18:37, 1 user, load average: 1.11, 0.83, 0.82



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