[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: History in subversion

From: Andrew Reedick <Andrew.Reedick_at_cbeyond.net>
Date: Tue, 11 Jun 2013 17:12:04 -0400

> From: Olivier Antoine [mailto:oliviera201304_at_gmail.com]
> Sent: Tuesday, June 11, 2013 4:45 PM
> To: users_at_subversion.apache.org
> Subject: Re: History in subversion
>
> Thanks for your help, I will try again this.
> But this is very poor compared to ClearCase. Nobody tried to script that ?

I used to use ClearCase in a past life (3.0 - 6.0). I haven't missed the ability to diff dirs. You might be stuck on doing things the CC way instead of learning the Subversion paradigms. It's going to be frustrating for a little while (it was for me.)

What are you trying to do that requires diff'ing the contents of directories?

> It is also possible to read the SVN repository without checkout, there is a way to address an element, something like this :
> <element url>@revnumber
> But it is not possible to use a syntax like this :
> <directory>@revnumber/<file>

You want to read up on peg revisions: http://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html

You don't need to specify the rev for each path in the component, e.g. "/view/foo/path_at_1/foo_at_2/bar_at_3/j.java_at_5". In SVN, the rev number is global, so you just "/path/foo/bar/j.java_at_5".

> I tried, it doesn't work.
> Actually, I just try to analyze all elements, files and directories, contained in a SVN repository. I'd like to be able to parse all the elements - if possible without any checkout (that would be great).

Use "svn export" (or for individual files, "svn cat")

> Other challenge is : I need to restore a file element that has been removed in a very old revision, and of course I don't know which one.
> Any search command or script with Subversion ?

You'll need to use a peg revision, e.g. "svn copy svn://..../path/foo.java_at_1234 ." To find the revision that the file was in can be tricky if you have deleted a parent dir. In the average case, you can run "svn log -v -q ^/path/to/branch > log.txt". Then search the text file for your missing file to get the revision. You can also use "svn log -v -q | egrep '^r|\/foo.java'". Worse case (you deleted a parent dir), you'll need to run the 'svn log' against the root of the repository (svn log -v -q ^/).

To re-emphasize, I'm very serious about the need to stop trying to apply CC paradigms to SVN. It's frustrating, and, in my experience, the CC way of doing things didn't provide significant advantages in (or over) SVN.
Received on 2013-06-11 23:13:24 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.