You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Robert William Vesterman <bo...@digitalarts.com> on 2008/03/17 21:00:09 UTC

diffs for all successive versions of a file?

I have a file, let's say blah.txt, which contains a line that's 
something like:

    xyz=37

In some previous versions of the file, it had different numbers there.  
Maybe in one version, it was:

    xyz=392384

And in another:

    xyz=-9932

I would like to find out all values that it has ever had.  Obviously I 
can use "svn log" to find all revisions at which the file was changed, 
and then do "svn diff -r N:M" for each successive pair.  However, due to 
the number of revisions, this would be somewhat of a pain.

So, what I would like is an easy way to automatically show all changes 
ever on this file.  I could then feed it to grep to get exactly what I 
want.  So, something like:

    svn diffForEverySuccessiveRevision blah.txt | grep xyz

I could write a script to do this, based off of the "svn log" / "svn 
diff -r N:M" method mentioned above, but I am hoping that there is 
already an existing easy way to do it.

Thanks in advance for any help.


Re: diffs for all successive versions of a file?

Posted by B Smith-Mannschott <bs...@gmail.com>.
On Mon, Mar 17, 2008 at 10:53 PM, Benjamin Smith-Mannschott <
bsmith.occs@gmail.com> wrote:

>
> On Mar 17, 2008, at 22:00, Robert William Vesterman wrote:
>
>> I have a file, let's say blah.txt, which contains a line that's something
>> like:
>> xyz=37
>> In some previous versions of the file, it had different numbers there.
>>  Maybe in one version, it was:
>> xyz=392384
>> And in another:
>> xyz=-9932
>> I would like to find out all values that it has ever had.  Obviously I can
>> use "svn log" to find all revisions at which the file was changed, and then
>> do "svn diff -r N:M" for each successive pair.  However, due to the number
>> of revisions, this would be somewhat of a pain.
>>
>> So, what I would like is an easy way to automatically show all changes
>> ever on this file.  I could then feed it to grep to get exactly what I want.
>>  So, something like:
>> svn diffForEverySuccessiveRevision blah.txt | grep xyz
>> I could write a script to do this, based off of the "svn log" / "svn diff
>> -r N:M" method mentioned above, but I am hoping that there is already an
>> existing easy way to do it.
>>
>> Thanks in advance for any help.
>>
>>
> This won't be much help, but maybe it'll jog someone elses memory:
>
> I recall reading (a few months back, somewhere on the internet) about a
> python script which did a sort of extended "svn blame", showing each version
> of every line back to the first revision of the file.  Problem is, I can't
> remember what the script was called or where I read about it.  Maybe someone
> else has better memory than I.
>

The script I was thinking of back then has been found (on another thread) by
Mark Eichin:

On Mon, Dec 1, 2008 at 5:41 AM, Mark Eichin <ei...@gmail.com> wrote:

> http://nedbatchelder.com/code/utilities/blameall_py.html
>
> is the tool I was talking about (didn't have a chance to dig it up
> from my phone when I first responded.)
>
>
// Ben Smith-Mannschott

Re: diffs for all successive versions of a file?

Posted by km...@rockwellcollins.com.
Benjamin Smith-Mannschott <bs...@gmail.com> wrote on 03/17/2008 
04:53:28 PM:
> On Mar 17, 2008, at 22:00, Robert William Vesterman wrote:
> > I have a file, let's say blah.txt, which contains a line that's 
> > something like:
> > xyz=37
> > In some previous versions of the file, it had different numbers 
> > there.  Maybe in one version, it was:
> > xyz=392384
> > And in another:
> > xyz=-9932
> > I would like to find out all values that it has ever had.  Obviously 
> > I can use "svn log" to find all revisions at which the file was 
> > changed, and then do "svn diff -r N:M" for each successive pair. 
> > However, due to the number of revisions, this would be somewhat of a 
> > pain.
> >
> > So, what I would like is an easy way to automatically show all 
> > changes ever on this file.  I could then feed it to grep to get 
> > exactly what I want.  So, something like:
> > svn diffForEverySuccessiveRevision blah.txt | grep xyz
> > I could write a script to do this, based off of the "svn log" / "svn 
> > diff -r N:M" method mentioned above, but I am hoping that there is 
> > already an existing easy way to do it.
> >
> > Thanks in advance for any help.
> >
> 
> This won't be much help, but maybe it'll jog someone elses memory:
> 
> I recall reading (a few months back, somewhere on the internet) about 
> a python script which did a sort of extended "svn blame", showing each 
> version of every line back to the first revision of the file.  Problem 
> is, I can't remember what the script was called or where I read about 
> it.  Maybe someone else has better memory than I.

Not exactly what the author was looking for, but this is an interesting
visual implementation in java I ran across recently: 

http://code.google.com/p/svn-time-lapse-view/

Kevin R.

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

Re: diffs for all successive versions of a file?

Posted by Benjamin Smith-Mannschott <bs...@gmail.com>.
On Mar 17, 2008, at 22:00, Robert William Vesterman wrote:
> I have a file, let's say blah.txt, which contains a line that's  
> something like:
> xyz=37
> In some previous versions of the file, it had different numbers  
> there.  Maybe in one version, it was:
> xyz=392384
> And in another:
> xyz=-9932
> I would like to find out all values that it has ever had.  Obviously  
> I can use "svn log" to find all revisions at which the file was  
> changed, and then do "svn diff -r N:M" for each successive pair.   
> However, due to the number of revisions, this would be somewhat of a  
> pain.
>
> So, what I would like is an easy way to automatically show all  
> changes ever on this file.  I could then feed it to grep to get  
> exactly what I want.  So, something like:
> svn diffForEverySuccessiveRevision blah.txt | grep xyz
> I could write a script to do this, based off of the "svn log" / "svn  
> diff -r N:M" method mentioned above, but I am hoping that there is  
> already an existing easy way to do it.
>
> Thanks in advance for any help.
>

This won't be much help, but maybe it'll jog someone elses memory:

I recall reading (a few months back, somewhere on the internet) about  
a python script which did a sort of extended "svn blame", showing each  
version of every line back to the first revision of the file.  Problem  
is, I can't remember what the script was called or where I read about  
it.  Maybe someone else has better memory than I.

// ben smith-mannschott

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

Re: diffs for all successive versions of a file?

Posted by Vincent Lefevre <vi...@vinc17.org>.
On 2008-03-17 14:15:39 -0700, Blair Zajac wrote:
> http://svn.collab.net/repos/svn/trunk/contrib/client-side/svn_all_diffs.pl

I assume that for each "svn diff" invocation, the server has to do
all the necessary work from scratch. Couldn't this be implemented
on the server side in O(N) where N is the number of revisions for
which the file has changed?

-- 
Vincent Lefèvre <vi...@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

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

Re: diffs for all successive versions of a file?

Posted by Blair Zajac <bl...@orcaware.com>.
Robert William Vesterman wrote:
> I have a file, let's say blah.txt, which contains a line that's 
> something like:
> 
>     xyz=37
> 
> In some previous versions of the file, it had different numbers there.  
> Maybe in one version, it was:
> 
>     xyz=392384
> 
> And in another:
> 
>     xyz=-9932
> 
> I would like to find out all values that it has ever had.  Obviously I 
> can use "svn log" to find all revisions at which the file was changed, 
> and then do "svn diff -r N:M" for each successive pair.  However, due to 
> the number of revisions, this would be somewhat of a pain.
> 
> So, what I would like is an easy way to automatically show all changes 
> ever on this file.  I could then feed it to grep to get exactly what I 
> want.  So, something like:
> 
>     svn diffForEverySuccessiveRevision blah.txt | grep xyz
> 
> I could write a script to do this, based off of the "svn log" / "svn 
> diff -r N:M" method mentioned above, but I am hoping that there is 
> already an existing easy way to do it.
> 
> Thanks in advance for any help.

Yes, use

http://svn.collab.net/repos/svn/trunk/contrib/client-side/svn_all_diffs.pl

which I wrote :)

Blair

-- 
Blair Zajac, Ph.D.
<bl...@orcaware.com>
http://www.orcaware.com/svn/

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