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

Re: finding which branches contain a bug

From: Ignacio García Fernández <ignacio.garcia_at_uv.es>
Date: 2006-01-04 12:22:13 CET

El mar, 03-01-2006 a las 18:21 -0800, Bart Robinson escribió:
> Let's say I find a bug (in one file) in trunk and want to know
> what branches also have the bug.

Hi. I don't know if there is an 0fficial way to do it. Perhaps it would
be nice that there existed a keyword, such as BASE or HEAD to refer to
the copy revision.

My way to do it is a small shell script. First you 'svn blame' on the
file where you found the bug. This is equivalent to 'cvs annotate'.
Then, what you should do, is to go into the directory where you have
your branches and 'svn log --stop-on-copy' each branch, to see when it
was copied.

The following script does it for you:
________________
#!/bin/bash
for FILE in $(ls); do
        echo $FILE;
        svn -q --stop-on-copy log $FILE|tail -n2 ;
done
----------------

You can change it so that it performs the check without a working copy:

_______________
#!/bin/bash
for FILE in $(svn ls $1); do
        echo $FILE;
        svn -q --stop-on-copy log $1/$FILE|tail -n2 ;
done
---------------
and you have to pass the path in the repository, as an argument for the
script.

Hope it helps

Regards

-- 
May the source be with you
---------------------------------------------------------------
Ignacio García Fernández                  Instituto de Robótica
ignacio.garcia_at_uv.es                 Universidad de Valencia
http://robotica.uv.es/~ignacio/            Tlf. +34 96 354 3564

Received on Wed Jan 4 12:23:07 2006

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.