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

Strange diffs after rsync copying of working copy

From: Johan Holmberg <holmberg_at_iar.se>
Date: Fri, 03 Feb 2012 12:47:57 +0100

Hi!

I get some strange reports of differences from "svn diff" and "svn
status" after doing the following operations:

   $ svn co http://somehost/somepath proj
   $ rsync -a proj proj-rsync-copy
   $
   $ svn status proj-rsync-copy
   ... reports modified files ...
   $ svn status proj # no modified files
   $
   $ svn diff proj-rsync-copy
   ... strange differences reported here ...
   $ svn diff proj # no differences
   $
   $ diff -r proj proj-rsync-copy # reports no differences
   $

The differences reported by "svn diff" are of two kinds: one is related
to keyword expansion, and the other one to the line-style of files. The
problem only occurs for a small subset of all files in the project, and
I suspect that they share some "peculiarity" in their history in the
Subversion archive (but I haven't been able to figure out what).

So I have two directory trees that are exactly equal (byte for byte),
but still treated differently by "svn". The only differences I can think
of are the timestamps of files in the trees. It seems that rsync only
copies "whole seconds" when creating the target directory tree. I use an
ext4 file system, and my files are normally stored with sub-second
precision (as can seen by ls --full-time).

To verify this hypothesis, I also did a copy with "cp -a" of my working
copy, and then I got NO differences in the new working copy. And GNU cp
actually copies the sub-second part of timestamps.

Is Subversion really sensitive to such timestamp differences? And for
which files? Since rsync is used as a backup tool, it can have quite
undesirable consequences.

I'm using:

Ubuntu 10.10, with:
svn, version 1.6.12 (r955767)
rsync version 3.0.7 protocol version 30
ext4 file system

Regards,
/Johan Holmberg
Received on 2012-02-03 12:58:52 CET

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