You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Lele Gaifax <le...@nautilus.homeip.net> on 2003/11/25 00:15:07 UTC

Text-base differs from wc, svn st doesn't notice

Hi there,

I'm experiencing a strange situation, and I cannot understand what is
going on.

I have a WC, extracted just a few days ago. Everything seemed ok,
until I found that Delphi wasn't able to load one of the forms (DFM,
in textual form): a little search revealed this:

$ svn --version
svn, version 0.33.0 (dev build)
   compiled Nov 14 2003, 11:24:41

Copyright (C) 2000-2003 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' schema
  - handles 'https' schema
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' schema

$ svn st
M      u_MainDM.pas
M      u_AnalisiModelloSingoleOperazioni.pas
M      u_AnalisiModelloBase.pas
M      u_MainDM.dfm
M      u_AnalisiModelloSingoleOperazioni.dfm
$ svn st u_AnalisiModelloBase.pas
M            1986     1986 lele         u_AnalisiModelloBase.pas
$ svn st -v u_AnalisiModelloBase.dfm
             1980     1296 lele         u_AnalisiModelloBase.dfm
$ cmp u_AnalisiModelloBase.dfm .svn/text-base/u_AnalisiModelloBase.dfm.svn-base
u_AnalisiModelloBase.dfm .svn/text-base/u_AnalisiModelloBase.dfm.svn-base differ: byte 16567, line 595

See? That DFM is actually corrupted (for whatever reason, see below),
but neither "svn st" nor "svn diff" signal the fact. The checksum in
.svn/entries matches the .svn-base version, and luckily it's the
version I get fetching out a fresh copy from the repository.

With a little bit of alarm, I went to the root of my working copy,
and executed the following:

$ for f in $(find . -path '.svn' -prune -o -name '*.dfm'); do \
  cmp -s $f $(dirname $f)/.svn/text-base/$(basename $f).svn-base ||\
  echo "$f"; done

to discover that I have four similar cases! One, in particular, is on
a project I did not even visited since checkout, and I cannot explain
how it got corrupted, but that's secondary. The real question is, how
is that svn doesn't notice?? Is this a known problem (I searched in
the issue tracker, but didn't find any related entry)? 

All the DFM are marked with svn:eol-style=CRLF, and extracted in a
ext3 filesystem hosted by a linux 2.4.22, if that matters. 

I know I should be testing this on 0.33.1 or HEAD, but I'll do that
after some sleep... 

thanx&bye,
lele.
-- 
nickname: Lele Gaifax	| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas	| comincerò ad aver paura di chi mi copia.
email: lele@seldati.it	|		-- Fortunato Depero, 1929.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Text-base differs from wc, svn st doesn't notice

Posted by Lele Gaifax <le...@nautilus.homeip.net>.
>>>>> "Greg" == Greg Hudson <gh...@MIT.EDU> writes:

    Greg> To save time, Subversion does not compare the contents of a
    Greg> working copy file with the text-base if the mod-time hasn't
    Greg> changed.

Ahh, you saved my night! |-)

    Greg> Also, if your system is corrupting data, it might be due to
    Greg> bad memory, in which case different reads of files may yield
    Greg> different results.  See www.memtest86.com if you want to
    Greg> check your system's memory.

Uhm, well, I think there may be other reasons, more plausible than
that, but I'll do a deeper check tomorrow.

Thanx!

ciao, lele.
-- 
nickname: Lele Gaifax	| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas	| comincerò ad aver paura di chi mi copia.
email: lele@seldati.it	|		-- Fortunato Depero, 1929.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Text-base differs from wc, svn st doesn't notice

Posted by Greg Hudson <gh...@MIT.EDU>.
On Mon, 2003-11-24 at 19:15, Lele Gaifax wrote:
> See? That DFM is actually corrupted (for whatever reason, see below),
> but neither "svn st" nor "svn diff" signal the fact. The checksum in
> .svn/entries matches the .svn-base version, and luckily it's the
> version I get fetching out a fresh copy from the repository.

Well, if your system is corrupting data, it's probably not playing nice
and adjusting the mod time of your files.  To save time, Subversion does
not compare the contents of a working copy file with the text-base if
the mod-time hasn't changed.

Also, if your system is corrupting data, it might be due to bad memory,
in which case different reads of files may yield different results.  See
www.memtest86.com if you want to check your system's memory.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Text-base differs from wc, svn st doesn't notice

Posted by Lele Gaifax <le...@nautilus.homeip.net>.
>>>>> "C" == C Michael Pilato <cm...@collab.net> writes:

    C> Do you have any svn:keywords set on those files that might be
    C> expanded?  If the newline styles are set to CRLF, that makes me
    C> think that these might be human-readable files.  Is that not
    C> true?  Do these files every contain binary data?  What does
    C> 'diff' (not 'svn diff', just 'diff') show you when comparing
    C> the base and working files?

Delphi5 introduced the capability of storing its DFMs in a textual
format(*). "Binary" (such as a bitmap) object are stored in base64 (or
something similar), simpler values in plain text. The format does not
offer any kind of comment, so no, it's not possible to use expandable
keywords. And the D5 parser expects CRLFs, otherwise it raises a "line
too long" exception. So, no svn:keywords and svn:eol-style=CRLF.

It something like:

    object Panel3: TPanel
      Left = 0
      Top = 0
      Width = 85
      Height = 63
      Align = alLeft
      BevelOuter = bvNone
      Caption = ' '
      TabOrder = 1
      object BitBtn1: TBitBtn
        Left = 7
        Top = 6
        Width = 72
        Height = 53
        Caption = 'Partiti!'
        TabOrder = 0
        OnClick = BitBtn1Click
        Glyph.Data = {
          76010000424D7601000000000000760000002800000020000000100000000100
          040000000 .... 3333333}
        Layout = blGlyphTop
        NumGlyphs = 2
      end
    end

ciao, lele.

(*) There's been a time when I used a combination of CVS
wrappers+dosemu+D3 convert.exe to automagically store my DFM in
textual form *within* the repository kept under *real* OS, translating
on-the-fly to/from binary and text representation at checkout/checkin
time.... Luckily, that's gone ;-)
-- 
nickname: Lele Gaifax	| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas	| comincerò ad aver paura di chi mi copia.
email: lele@seldati.it	|		-- Fortunato Depero, 1929.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Text-base differs from wc, svn st doesn't notice

Posted by "C. Michael Pilato" <cm...@collab.net>.
Lele Gaifax <le...@nautilus.homeip.net> writes:

> $ svn st
> M      u_MainDM.pas
> M      u_AnalisiModelloSingoleOperazioni.pas
> M      u_AnalisiModelloBase.pas
> M      u_MainDM.dfm
> M      u_AnalisiModelloSingoleOperazioni.dfm
> $ svn st u_AnalisiModelloBase.pas
> M            1986     1986 lele         u_AnalisiModelloBase.pas
> $ svn st -v u_AnalisiModelloBase.dfm
>              1980     1296 lele         u_AnalisiModelloBase.dfm
> $ cmp u_AnalisiModelloBase.dfm .svn/text-base/u_AnalisiModelloBase.dfm.svn-base
> u_AnalisiModelloBase.dfm .svn/text-base/u_AnalisiModelloBase.dfm.svn-base differ: byte 16567, line 595
> 
> See? That DFM is actually corrupted (for whatever reason, see below),
> but neither "svn st" nor "svn diff" signal the fact. The checksum in
> .svn/entries matches the .svn-base version, and luckily it's the
> version I get fetching out a fresh copy from the repository.

First, I'm ignorant of Delphi thingamabobs.  So sorry if I make false
assumptions.

Do you have any svn:keywords set on those files that might be
expanded?  If the newline styles are set to CRLF, that makes me think
that these might be human-readable files.  Is that not true?  Do these
files every contain binary data?  What does 'diff' (not 'svn diff',
just 'diff') show you when comparing the base and working files?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org