subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Reedick <Andrew.Reed...@cbeyond.net>
Subject RE: History in subversion
Date Tue, 11 Jun 2013 21:12:04 GMT
> From: Olivier Antoine [mailto:oliviera201304@gmail.com] 
> Sent: Tuesday, June 11, 2013 4:45 PM
> To: users@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@1/foo@2/bar@3/j.java@5".
 In SVN, the rev number is global, so you just "/path/foo/bar/j.java@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@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.




Mime
View raw message