You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mathias Weinert <ma...@gfa-net.de> on 2006/01/18 11:42:55 UTC

Different time stamps depending on the client

Hi there,

I just encountered the following problem using Subversion 1.3.0
under cygwin and subclipse (nevertheless for me this is a general
thing when using different clients):

I first checked out a working copy using subclipse and then said
'svn st' from my cygwin command prompt. It took over 2 minutes
for 'svn st' to finish whereas on another PC it only took
some seconds.

The solution to this problem is that subclipse retrieves the
modification time of files including microseconds so in the
entries file the times in the text-time property were all
stored with micorseconds.
Unfortunately my Subversion client only retrieves the
modification time without microseconds so for every single file
a diff was made which took this long time.

After applying the followin patch:
--- subversion/libsvn_wc/questions.c.orig	2005-06-20 20:35:21.000000000 +0200
+++ subversion/libsvn_wc/questions.c	2006-01-18 09:45:47.495428800 +0100
@@ -209,7 +209,13 @@
     SVN_ERR (svn_time_from_cstring (&wfile_time, tstr, pool));
     */
   }
-  
+
+  // ignore msecs in case entries file was generated with a system that
+  // uses msecs and that the system now doesn't retrieve msecs from
+  // the wc file
+  wfile_time -= apr_time_usec(wfile_time);
+  entrytime -= apr_time_usec(entrytime);
+
   if (wfile_time == entrytime)
     *equal_p = TRUE;
   else

it only needs the same time as on the other PC for 'svn st'
to finish.

(And I also got this performance if I did the checkout from the
cygwin command prompt -> then all text-time propties in the
entries files were stored without 0 microseconds.)

Now I am interested in oppinions to the following two questions:

- Is it be possible for Subversion/APR to also retrieve the
file modification time including microseconds?

- Is ignoring the microseconds as done in my little patch okay?

Regards

Mathias

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

Re: Different time stamps depending on the client

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Wed, Jan 18, 2006 at 08:12:12PM +0100, Peter N. Lundblad wrote:
> On Wed, 18 Jan 2006, Malcolm Rowe wrote:
> 
> > I think the right fix would be to extend APR's UNIX implementation to
> > read the nanosecond fields from stat(), if available.  Take a look at
> > file_io/unix/filestat.c:fill_out_finfo() for starters, and compare to
> > coreutils' lib/stat-time.h.
> >
> That'd break on Linux, where the time has subsecond precision in the
> dentry cache (I think), but not on-disk at leas for ext2 and ext3
> filesystems. That's broken.
> 

Wow, that sounds utterly crazy (yet, less so as I keep thinking about
it...).  I've never heard of that before, but I wouldn't be overly
surprised.  What does 'make' do, I wonder?

> I'm not sure why people are mixing cygwin and native svn libraries.
> 

Ack.

Regards,
Malcolm

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

Re: Different time stamps depending on the client

Posted by Branko Čibej <br...@xbc.nu>.
Peter N. Lundblad wrote:
> On Wed, 18 Jan 2006, Malcolm Rowe wrote:
>
>   
>> I think the right fix would be to extend APR's UNIX implementation to
>> read the nanosecond fields from stat(), if available.  Take a look at
>> file_io/unix/filestat.c:fill_out_finfo() for starters, and compare to
>> coreutils' lib/stat-time.h.
>>
>>     
> That'd break on Linux, where the time has subsecond precision in the
> dentry cache (I think), but not on-disk at leas for ext2 and ext3
> filesystems. That's broken.
>
> I'm not sure why people are mixing cygwin and native svn libraries.
>   
Because "we told them not to but they wouldn't listen."

-- Brane


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

Re: Different time stamps depending on the client

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Wed, 18 Jan 2006, Malcolm Rowe wrote:

> I think the right fix would be to extend APR's UNIX implementation to
> read the nanosecond fields from stat(), if available.  Take a look at
> file_io/unix/filestat.c:fill_out_finfo() for starters, and compare to
> coreutils' lib/stat-time.h.
>
That'd break on Linux, where the time has subsecond precision in the
dentry cache (I think), but not on-disk at leas for ext2 and ext3
filesystems. That's broken.

I'm not sure why people are mixing cygwin and native svn libraries.

Thanks,
//Peter

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

Re: Different time stamps depending on the client

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Wed, Jan 18, 2006 at 12:42:55PM +0100, Mathias Weinert wrote:
> Hi there,
> 
> I just encountered the following problem using Subversion 1.3.0
> under cygwin and subclipse (nevertheless for me this is a general
> thing when using different clients):
> 
> I first checked out a working copy using subclipse and then said
> 'svn st' from my cygwin command prompt. It took over 2 minutes
> for 'svn st' to finish whereas on another PC it only took
> some seconds.
> 

This problem is caused because APRs UNIX implementation isnt able to read
the nanosecond part of the times returned by fstat().  In contrast, APRs
Windows implementation can, so my Windows-native binaries are producing
entries files with nanosecond resolution, correctly.

(cygwin's UNIX environment reads the times fine: just try coreutils'
'stat' command to see the result; the relevant parts have not been
changed by the cygwin packager, they're generic).

I think the right fix would be to extend APR's UNIX implementation to
read the nanosecond fields from stat(), if available.  Take a look at
file_io/unix/filestat.c:fill_out_finfo() for starters, and compare to
coreutils' lib/stat-time.h.

Regards,
Malcolm

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