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

Re: Restricting svn log --diff output to single file

From: sebb <sebbaz_at_gmail.com>
Date: Fri, 20 Jan 2012 15:54:37 +0000

On 20 January 2012 15:36, Stephen Butler <sbutler_at_elego.de> wrote:
>
> On Jan 20, 2012, at 16:27 , sebb wrote:
>
>> The command
>>    svn log filename
>> shows a list of revisions in which filename was changed.
>>
>> I would expect
>>    svn log --diff filename
>> to only show the differences for that file.
>>
>> However, it shows the differences for all files changed in each revision.
>> Is that really intentional?
>> If so, how can I restrict the differences to just a single file?
>>
>> I am using:
>>
>> svn, version 1.7.2 (r1207936)
>>   compiled Nov 29 2011, 22:11:2
>>
>> Try the following examples:
>>
>> $ svn log -l2 http://svn.apache.org/repos/asf/subversion/branches/1.0.x/@848689
>> -qv
>>
> [...]
>>
>> $ svn log -l2 http://svn.apache.org/repos/asf/subversion/branches/1.0.x/@848689
>> --diff
>
>
> Have you tried the full path to the file?  The following works for me:
>
>  $ svn log -l2 http://svn.apache.org/repos/asf/subversion/branches/1.0.x/STATUS@848689 --diff

Sorry, was trying lots of things and posted the wrong example, I did
try with the file name:

svn log -l14 http://svn.apache.org/repos/asf/subversion/branches/1.0.x/STATUS@848689
-qv

r848689 | sussman | 2004-02-11 22:01:13 +0000 (Wed, 11 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848664 | kfogel | 2004-02-09 22:51:34 +0000 (Mon, 09 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
   M /subversion/branches/1.0.x/packages/win32-innosetup/Pre.rtf
   M /subversion/branches/1.0.x/packages/win32-innosetup/Readme.txt
   M /subversion/branches/1.0.x/packages/win32-innosetup/W32notes.txt
   A /subversion/branches/1.0.x/packages/win32-innosetup/is_main.pas
(from /subversion/trunk/packages/win32-innosetup/is_main.pas:848450)
   D /subversion/branches/1.0.x/packages/win32-innosetup/isx_main.pas
   M /subversion/branches/1.0.x/packages/win32-innosetup/svn.iss
   M /subversion/branches/1.0.x/packages/win32-innosetup/templates/paths_inno_src.iss
   M /subversion/branches/1.0.x/packages/win32-innosetup/tools/mk_distro.pl
   M /subversion/branches/1.0.x/packages/win32-innosetup/tools/mk_htmlhelp.bat
   M /subversion/branches/1.0.x/packages/win32-innosetup/tools/svnpath/main.c
------------------------------------------------------------------------
r848663 | kfogel | 2004-02-09 22:41:36 +0000 (Mon, 09 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848660 | sussman | 2004-02-09 17:15:44 +0000 (Mon, 09 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848649 | dlr | 2004-02-06 19:41:36 +0000 (Fri, 06 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848644 | dlr | 2004-02-06 07:22:41 +0000 (Fri, 06 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848642 | blair | 2004-02-06 00:49:19 +0000 (Fri, 06 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848641 | kfogel | 2004-02-05 22:53:41 +0000 (Thu, 05 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848640 | sussman | 2004-02-05 22:07:00 +0000 (Thu, 05 Feb 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848605 | kfogel | 2004-01-27 20:50:59 +0000 (Tue, 27 Jan 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848604 | josander | 2004-01-27 20:29:18 +0000 (Tue, 27 Jan 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848600 | kfogel | 2004-01-27 18:29:48 +0000 (Tue, 27 Jan 2004)
Changed paths:
   M /subversion/branches/1.0.x/STATUS
------------------------------------------------------------------------
r848598 | kfogel | 2004-01-27 17:08:24 +0000 (Tue, 27 Jan 2004)
Changed paths:
   D /subversion/branches/1.0-stabilization
   A /subversion/branches/1.0.x (from
/subversion/branches/1.0-stabilization:848597)
------------------------------------------------------------------------
r848575 | kfogel | 2004-01-24 17:46:46 +0000 (Sat, 24 Jan 2004)
Changed paths:
   M /subversion/branches/1.0-stabilization/Makefile.in
   M /subversion/branches/1.0-stabilization/STATUS
   M /subversion/branches/1.0-stabilization/build/ac-macros/swig.m4
   M /subversion/branches/1.0-stabilization/packages/rpm/mandrake-9.0/Makefile
   M /subversion/branches/1.0-stabilization/packages/rpm/mandrake-9.1/Makefile
   M /subversion/branches/1.0-stabilization/packages/rpm/mandrake-9.2/Makefile
   M /subversion/branches/1.0-stabilization/subversion/bindings/swig/INSTALL
   M /subversion/branches/1.0-stabilization/subversion/bindings/swig/README
   M /subversion/branches/1.0-stabilization/subversion/bindings/swig/perl/Makefile.PL
   M /subversion/branches/1.0-stabilization/subversion/bindings/swig/swigutil_pl.h
   M /subversion/branches/1.0-stabilization/subversion/bindings/swig/swigutil_py.h
------------------------------------------------------------------------

Note that r848598 involves a directory copy.

The diff command:

$ svn log -l14 http://svn.apache.org/repos/asf/subversion/branches/1.0.x/STATUS@848689
--diff

behaves properly up to that point, but then I get:

>>>
r848598 | kfogel | 2004-01-27 17:08:24 +0000 (Tue, 27 Jan 2004) | 1 line

Rename branches/1.0-stabilization to branches/1.0.x, as Brane suggested.

Index: 1.0-stabilization/Makefile.in
===================================================================
--- 1.0-stabilization/Makefile.in (revision 848574)
+++ 1.0-stabilization/Makefile.in (revision 848575)

<snip other file diffs/>

<<<

So it looks as though diff is broken when handling directory copies.

> Regards,
> Steve
Received on 2012-01-20 16:55:13 CET

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.