Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7DF2311C44 for ; Tue, 13 May 2014 19:25:28 +0000 (UTC) Received: (qmail 59901 invoked by uid 500); 13 May 2014 17:38:48 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 59865 invoked by uid 500); 13 May 2014 17:38:48 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 59858 invoked by uid 99); 13 May 2014 17:38:48 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2014 17:38:48 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of danellis10@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-we0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2014 17:38:45 +0000 Received: by mail-we0-f180.google.com with SMTP id t61so727929wes.25 for ; Tue, 13 May 2014 10:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iZQwalNhjC8XKrsHTAnFkb/e8sk1nOYBWzfu/xFVgIE=; b=nJj+9Bzg18RvLLqoxXW5Wot23o4Iu/HJWc2EvwYKQgUnVffghOpiTzKMZKatbUNcBW 81eQffTFY8EeQv5LraUfrZnklCvOPzBCMALBxQYb+CLQZaFAZqADM0zfvVRqRrA6ZYQr 6H6zH1Zv/TdQr3/mertB7v67P34LdnOnNAUU9EdzXvX0ukRnFC8gudY/cww+k1P9yGor 7ojMOygJTHHfH24xC5DXeJeLC0wt++LOG9inppuK0Z1KXYusg1Opw3aQbeuRv8Z74H98 Mm2/jiehxZaPEJzYkfQcuB+qd0yJGuIp/M3lyIUG+RTLCYFoNW9RlagoYv9r7ZRoLIQT pfFw== MIME-Version: 1.0 X-Received: by 10.180.126.33 with SMTP id mv1mr22019726wib.6.1400002702322; Tue, 13 May 2014 10:38:22 -0700 (PDT) Received: by 10.194.24.164 with HTTP; Tue, 13 May 2014 10:38:22 -0700 (PDT) In-Reply-To: <53724B8B.7090501@reser.org> References: <53724B8B.7090501@reser.org> Date: Tue, 13 May 2014 10:38:22 -0700 Message-ID: Subject: Re: svn diff --summarize question From: Dan Ellis To: Ben Reser Cc: Subversion Users Content-Type: multipart/alternative; boundary=e89a8f839d71c1bc4d04f94b8747 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f839d71c1bc4d04f94b8747 Content-Type: text/plain; charset=UTF-8 Hi Ben, I am actually running SVN 1.8.5 on a windows 7 box. I tried removing the --new/--old to see if that would cause issues, but no avail: c:\Project_files\sandbox>svn diff --ignore-properties "c:\project_files\sandbox\AAAA.txt"http://svr/repo/AAAA.txt@3813 --summarize D C:\project_files\sandbox_v2\AAAA.txt A C:\project_files\sandbox_v2\AAAA.txt I may try upgrading to 1.8.8 if you think there have been any changes since 1.8.5 in this area. Thanks, Dan On Tue, May 13, 2014 at 9:42 AM, Ben Reser wrote: > On 5/12/14, 2:36 PM, Dan Ellis wrote: > > I'm trying to diff the contents between of a local working copy file to > a file > > in the repository (I really just need a yes/no answer). This file > happens to > > be identical in content, but they do not share the same ancestry > (unrelated nodes). > > > > When I do a diff with no --summarize option, I get what I expect, namely > no output: > > > > c:\Project_files\sandbox>svn diff --ignore-properties > > --old="c:\project_files\sandbox_v2\AAAA.txt" --new=" > http://svr/repo/foo.txt@3813" > > c:\Project_files\sandbox> > > > > When I add the --summarize argument to the command line, I get the > following: > > c:\Project_files\sandbox>svn diff --ignore-properties > > --old="c:\project_files\sandbox\AAAA.txt" --new=" > http://svr/repo/AAAA.txt@3813" > > --summarize > > D C:\project_files\sandbox\AAAA.txt > > A C:\project_files\sandbox\AAAA.txt > > > > From reading http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.diff.html, > it > > looks like the behavior I'm seeing is similar to the --notice-ancestry > flag: > > > > "By default, svn diff ignores the ancestry of files and merely compares > the > > contents of the two files being compared. If you use --notice-ancestry, > the > > ancestry of the paths in question will be taken into consideration when > > comparing revisions (i.e., if you run svn diff on two files with > identical > > contents but different ancestry, you will see the entire contents of the > file > > as having been removed and added again)." > > > > How can I get the --summarize behavior to only look at file contents? I > fee > > like I might be missing something obvious. > > I suspect you're using 1.7.x or older. The summarize feature was entirely > rewritten in 1.8.x and works for the scenario you describe. We know that > --summarize has issues in 1.7.x and older (and I spent a lot of effort > trying > to fix some of the cases). > > Example using 1.8.9 (this isn't out yet but it should work in 1.8.8): > > $ svnadmin-1.8 create repo8 > $ svn-1.8 co file://$PWD/repo8 wc8 > Checked out revision 0. > $ cd wc8 > $ echo something > foo > $ svn-1.8 add foo > A foo > $ svn-1.8 ci -mm > Adding foo > Transmitting file data . > Committed revision 1. > $ svn-1.8 rm foo > D foo > $ echo something > foo > $ svn-1.8 add foo > A foo > $ svn-1.8 diff foo > $ svn-1.8 diff --summarize foo > $ svn-1.8 diff --summarize --notice-ancestry foo > D foo > A foo > > One thing you may notice is I don't have to use --new and --old because > 1.8 can > do summarize against paths just within the working copy now (I'm guessing > that > your --old is your BASE for your wc). > > So I suggest that you upgrade to 1.8.x. > > --e89a8f839d71c1bc4d04f94b8747 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Ben,
=
I am a= ctually running SVN 1.8.5 on a windows 7 box. =C2=A0I tried removing the --= new/--old to see if that would cause issues, but no avail:

=
c:\Project_= files\sandbox>svn diff --ignore-properties "c:\project_files\sandbo= x\AAAA.txt"http://svr/repo/AAAA.txt@3813=C2=A0--summarize
D =C2=A0 =C2=A0 =C2=A0 C:\project_files\sandbox_v2\AAAA.txt
= A =C2=A0 =C2=A0 =C2=A0 C:\project_files\sandbox_v2\AAAA.txt

I may try upgrading to 1.8.8 if you think there have been any changes since= 1.8.5 in this area.

Thanks,
Dan


On Tue, May 13, 2014 at 9:42 AM, Ben Reser &= lt;ben@reser.org>= wrote:
On 5= /12/14, 2:36 PM, Dan Ellis wrote:
> I'm trying to diff the contents between of a local working copy fi= le to a file
> in the repository (I really just need a yes/no answer). =C2=A0This fil= e happens to
> be identical in content, but they do not share the same ancestry (unre= lated nodes).
>
> When I do a diff with no --summarize option, I get what I expect, name= ly no output:
>
> c:\Project_files\sandbox>svn diff --ignore-properties
> --old=3D"c:\project_files\sandbox_v2\AAAA.txt" --new=3D"= ;http://svr/repo= /foo.txt@3813"
> c:\Project_files\sandbox>
>
> When I add the --summarize argument to the command line, I get the fol= lowing:
> c:\Project_files\sandbox>svn diff --ignore-properties
> --old=3D"c:\project_files\sandbox\AAAA.txt" --new=3D"http://svr/repo/A= AAA.txt@3813"
> --summarize
> D =C2=A0 =C2=A0 =C2=A0 C:\project_files\sandbox\AAAA.txt
> A =C2=A0 =C2=A0 =C2=A0 C:\project_files\sandbox\AAAA.txt
>
> From reading http://svnbook.red-bean.com/en/1.7/svn.ref.= svn.c.diff.html, it
> looks like the behavior I'm seeing is similar to the --notice-ance= stry flag:
>
> "By default, svn diff ignores the ancestry of files and merely co= mpares the
> contents of the two files being compared. If you use --notice-ancestry= , the
> ancestry of the paths in question will be taken into consideration whe= n
> comparing revisions (i.e., if you run svn diff on two files with ident= ical
> contents but different ancestry, you will see the entire contents of t= he file
> as having been removed and added again)."
>
> How can I get the --summarize behavior to only look at file contents? = =C2=A0I fee
> like I might be missing something obvious.

I suspect you're using 1.7.x or older. =C2=A0The summarize = feature was entirely
rewritten in 1.8.x and works for the scenario you describe. =C2=A0We know t= hat
--summarize has issues in 1.7.x and older (and I spent a lot of effort tryi= ng
to fix some of the cases).

Example using 1.8.9 (this isn't out yet but it should work in 1.8.8):
$ svnadmin-1.8 create repo8
$ svn-1.8 co file://$PWD/repo8 wc8
Checked out revision 0.
$ cd wc8
$ echo something > foo
$ svn-1.8 add foo
A =C2=A0 =C2=A0 =C2=A0 =C2=A0 foo
$ svn-1.8 ci -mm
Adding =C2=A0 =C2=A0 =C2=A0 =C2=A0 foo
Transmitting file data .
Committed revision 1.
$ svn-1.8 rm foo
D =C2=A0 =C2=A0 =C2=A0 =C2=A0 foo
$ echo something > foo
$ svn-1.8 add foo
A =C2=A0 =C2=A0 =C2=A0 =C2=A0 foo
$ svn-1.8 diff foo
$ svn-1.8 diff --summarize foo
$ svn-1.8 diff --summarize --notice-ancestry foo
D =C2=A0 =C2=A0 =C2=A0 foo
A =C2=A0 =C2=A0 =C2=A0 foo

One thing you may notice is I don't have to use --new and --old because= 1.8 can
do summarize against paths just within the working copy now (I'm guessi= ng that
your --old is your BASE for your wc).

So I suggest that you upgrade to 1.8.x.


--e89a8f839d71c1bc4d04f94b8747--