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

Re: strange diffs reported due to wc round-trip in zip

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: Thu, 6 Mar 2008 20:22:12 +0100

On Thu, Mar 6, 2008 at 5:59 PM, Richard Carlsson
<richard.carlsson_at_iar.se> wrote:
> David Glasser wrote:
> > On Thu, Mar 6, 2008 at 5:00 AM, Richard Carlsson
> > <richard.carlsson_at_iar.se> wrote:
> >> We've seen some recent weirdness which seems to boil down
> >> to the following:
> >>
> >> 1. A text-base file contains $Id:$, rather than $Id$
> >> 2. The wc being zipped up, and then unzipped again.
> >>
> >> The result is that in the unzipped version of the wc (which is
> >> otherwise identical to the original wc, according to diff/cmp),
> >
> > Can you clarify: when comparing the two wcs, byte-for-byte (including
> > all .svn directories), what is the exact difference?
>
> None whatsoever. All files, including the contents of .svn directories,
> are identical. Still, I get this after zip/unzip:
>
>
> >svn st original unzipped
> M unzipped\src\Table.cpp
> >diff -r original unzipped
> >
>
> I've tried different variations of flags to diff to make sure I'm not nuts.
> And if I manually change a single character in some text-base file, it shows
> up immediately with diff -r, so I'm fairly confident that there are no
> differences between these directory trees. But svn diff says otherwise.
> File system timestamps seem to be the only thing that have changed as
> a result from the zip/unzip round trip.

Well, it's a well known issue, although I'm not sure it's filed in the
database at the moment (I tried to find it but couldn't).

What happens is this:

 - The timestamp changes
 - 'svn status' detects the timestamp differs from the one 'on file'
 - 'svn status' sees the file has the "Id" svn:keyword set
 - 'svn status' "translates" the working copy file to its repository normal form
   for the "Id" keyword (which is $Id$)
 - after translating the working copy file, it compares the base and
   canonical wc files, finding that one has $Id:$ and the other $Id$,
hence they differ

You can achieve the same thing in 'original' by making sure the
timestamp changes.

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-03-06 20:22:27 CET

This is an archived mail posted to the Subversion Dev mailing list.