[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: C. Michael Pilato <cmpilato_at_collab.net>
Date: Thu, 06 Mar 2008 14:29:53 -0500

Erik Huelsmann wrote:
> 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.

This is precisely what I assumed was happening, but I was having trouble
setting up a recipe for it. The problem (for me) was getting both a file in
text-base with "$Id:$" and with keyword substitution enabled. Perhaps if I
didn't use a Subversion client to get the file into the repository I'd have
better luck?

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-03-06 20:30:08 CET

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