[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: Richard Carlsson <richard.carlsson_at_iar.se>
Date: Thu, 06 Mar 2008 20:48:27 +0100

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

Ok, so the problem is that $Id:$ gets expanded to $Id: ... $, which gets
normalized back to $Id$, which is not the same thing. And the check is only
triggered by the timestamp change which normally does not happen. Thanks for
the clarification.

I did a quick experiment, adding and committing three new C files, which
contained the following keywords in the header comment:

     foo.c $Id$
     bar.c $Id:$
     baz.c $Id: baz.c 56 2008-03-06 19:35:19Z richardc $

(The last one should correspond to checking in a file that previously
lived under CVS or RCS, or some other SVN repo.)

They all got the same automatic properties:
   svn:keywords : Id Date Author Rev
   svn:eol-style : native

This is how they turned out in the text-base file after committing:

     foo.c $Id$
     bar.c $Id:$
     baz.c $Id$

Seems to me there's a bug in the normalization code, that does not
get rid of the colon if there is nothing following it.

     /Richard

---------------------------------------------------------------------
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:48:38 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.