You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Philip M. Gollucci" <pg...@p6m7g8.com> on 2006/05/03 02:45:30 UTC

list all tags/branches a for an arbitrary file(s)/dir(s)

Hi,

I've built, installed, configured,
cvs2svn
cvsgraph
httpd
    mod_python / mod_dav_svn
mysql
python
subversion
swig
viewvc

Then run cvs2svn.
I've also created/built the "bonsai" like query database.

What I need now is to spot check a random set of files to see if the 
tagging/branching/history got created correctly.

The functionality I'm missing is equivalent to
cvs log path/to/file
or
cvs status -v path/to/file

This tells me EVERY tag/branch for this file and the "cvs revision" it occured on.

 From what I gather on this list archives, and Google, this can not be done ?

How then, do I verify a cvs2svn import ?

P.S.
   Please keep the CC-list intact.  Thanks.



-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

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

Re: list all tags/branches a for an arbitrary file(s)/dir(s)

Posted by Baz <br...@gmail.com>.
On 5/3/06, Philip M. Gollucci <pg...@p6m7g8.com> wrote:
> What I need now is to spot check a random set of files to see if the
> tagging/branching/history got created correctly.
>
> The functionality I'm missing is equivalent to
> cvs log path/to/file
> or
> cvs status -v path/to/file

You can try something like this:
svn log  -qv  $REPO|perl -ne 'if (/^(r\d+)/) {$r=$1}; next unless
/^(\s|-)+/; if (/^\s*A.*\(from/) { $b=$_; $c++; } elsif (/^---/) {
print "$r $b" if $c == 1; $c = 0; } else {$c+=2}' |less

which prints branch points like:
r9582    A /blah/branches/hoopity (from /blah/trunk:9581)

What I did there was parse the log for changes, looking for commits
where an 'A xxx (from yyy:rrr)' line that are the only change in a
revision (so they can't be a move)

It'll fail if theres something in a branch commit other than a single
copy. You can get more accurate results if you have xmlstarlet
installed:

svn log -qv --xml $REPO | xml sel -t -c
"/log/logentry[paths/path[@action='A'][@copyfrom-rev][not(@copyfrom-path=../path[@action='D'])]]"

(warning: this will take some time! You might want to try it with
--limit xxx on svn log first, or dump the log to a file first) This
prints out all log entries where a copy (ie branch, tag) occurred. You
can obviously do this with xsl too, the xpath above should help.

-Baz

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


Re: list all tags/branches a for an arbitrary file(s)/dir(s)

Posted by Konrad Rosenbaum <ko...@silmor.de>.
On Wednesday 03 May 2006 04:45, Philip M. Gollucci wrote:
> What I need now is to spot check a random set of files to see if the
> tagging/branching/history got created correctly.
>
> The functionality I'm missing is equivalent to
> cvs log path/to/file
> or
> cvs status -v path/to/file
>
> This tells me EVERY tag/branch for this file and the "cvs revision" it
> occured on.
>
>  From what I gather on this list archives, and Google, this can not be
> done ?
>
> How then, do I verify a cvs2svn import ?

Do it the other way around: check that all files are there when you list the 
tags/branches.

Suppose your project is "smyrk", then cvs2svn will have created this 
hierarchy:

smyrk
 -> trunk
 -> branches
  -> all-your-branches
  ->...
 -> tags
  -> all-your-tags
  ->...

1) do "svn ls .../smyrk/branches" - check that all the branches are there
2) do "svn ls .../smyrk/branches/randombranch" - check that all the files 
are there
3) do "svn log .../smyrk/branches/randombranch" - check that it was copied 
from the correct version of trunk
4) do the same for tags


	Konrad

Re: list all tags/branches a for an arbitrary file(s)/dir(s)

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 3, 2006, at 04:45, Philip M. Gollucci wrote:

> The functionality I'm missing is equivalent to
> cvs log path/to/file
> or
> cvs status -v path/to/file
>
> This tells me EVERY tag/branch for this file and the "cvs revision"  
> it occured on.
>
> From what I gather on this list archives, and Google, this can not  
> be done ?

I haven't really used CVS, but I gather that in CVS, a tag or branch  
is a property of a file, and therefore this operation makes sense.  
(Show me all values of this file's tag / branch property.) In  
Subversion, however, tags and branches are represented as completely  
ordinary directories with no special meaning other than the one you  
assign mentally. So in Subversion, files are elements of a directory  
-- elements of a branch or tag -- and so the same operation can't be  
done that way...



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