You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2001/06/27 20:24:20 UTC

Timestamp weirdness

Yeah, I'm still alive, and finding bugs. Here's a beauty:

I made a fresh build of Apache and Subversion earlier today, and decided 
it was time to finnaly test ra_dav. So here's what I did:

    svnadmin create /home/brane/repo
    svn co file:///home/brane/repo -d test1
    cd test1; vi README; svn add README
    svn ci; svn up; cd ..
    svn co http://localhost/repo -d test2


So far so good. Then I compared the two working copies:

[brane@silmaril src]$ diff -urp test1 test2
diff -urp test1/SVN/dir-wcprops test2/SVN/dir-wcprops
--- test1/SVN/dir-wcprops	Wed Jun 27 21:47:44 2001
+++ test2/SVN/dir-wcprops	Wed Jun 27 21:59:44 2001
@@ -0,0 +1,9 @@
+K 66
+svn:wc:http://subversion.tigris.org/props/ra/dav/local/version-url
+V 19
+/repo/$svn/ver/0.1/
+K 67
+svn:wc:http://subversion.tigris.org/props/ra/dav/local/activity-url
+V 15
+/repo/$svn/act/
+END
diff -urp test1/SVN/entries test2/SVN/entries
--- test1/SVN/entries	Wed Jun 27 22:00:37 2001
+++ test2/SVN/entries	Wed Jun 27 21:59:44 2001
@@ -5,9 +5,9 @@
    name="svn:this_dir"
    kind="dir"
    revision="1"
-   ancestor="file:///home/brane/repo"/>
+   ancestor="http://localhost/repo"/>
 <entry
    name="README"
-   text-time="Thu 28 Jun 2001 01:48:46.-1073753252 (day 179, dst 1, gmt_off 007200)"
+   text-time="Wed 27 Jun 2001 23:59:43.-1073744308 (day 178, dst 1, gmt_off 007200)"
    kind="file"/>
 </wc-entries>
Only in test2/SVN/wcprops: README


Everything looks fine, except the differences in the text-time fields in 
SVN/entries. Neither of these values is correct; I'm typing this at 
22:21 GMT+2, about half an hour after I ran the test.

Any ideas?

-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM :   <br...@acm.org>            http://www.acm.org/



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

Re: Timestamp weirdness

Posted by Branko Čibej <br...@xbc.nu>.
Ben Collins-Sussman wrote:

>Now -- *why* are these timestamps bogus?  I have no idea.  
>
I have, now. :-)

>I wonder if
>the APR time interfaces have changed since last October, and we just
>didn't notice the breakage.
>
I don't think those APR functions were ever O.K. But I'm not about to go 
diffing after it.

>Either way, please file a bug in Issuezilla!
>
Right. This is now (resolved, heh heh) issue 404. I'll take the 
remaining issue to the APR list.


-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM :   <br...@acm.org>            http://www.acm.org/




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

Re: Timestamp weirdness

Posted by Ben Collins-Sussman <su...@collab.net>.
Branko =?ISO-8859-2?Q?=C8ibej?= <br...@xbc.nu> writes:

> -   text-time="Thu 28 Jun 2001 01:48:46.-1073753252 (day 179, dst 1, gmt_off 007200)"
> +   text-time="Wed 27 Jun 2001 23:59:43.-1073744308 (day 178, dst 1, gmt_off 007200)"
> 
> Everything looks fine, except the differences in the text-time fields in 
> SVN/entries. Neither of these values is correct; I'm typing this at 
> 22:21 GMT+2, about half an hour after I ran the test.

You know, I've noticed this oddness for a *long* time and have always
wondered.  It seems like the timestamps are always bizarre. 

Of course, the bug is (currently) harmless;  the timestamps exist
merely as a shortcut to determine if a file has been locally
modified.  But as it stands, having a bogus timestamp only removes
this shortcut.  Here's the logic behind svn_wc_text_modified_p():


     if (text-base-size != working-file-size)
          return MODIFIED;
     else if (working-file-timestamp == entries-timestamp)
          return NOT_MODIFIED;
     else
          do byte-for-byte comparison of working-file and text-base


So, as you can see, this bug is simply causing a lot of needless
"brute force" testing of file's contents.

Now -- *why* are these timestamps bogus?  I have no idea.  I wonder if
the APR time interfaces have changed since last October, and we just
didn't notice the breakage.

Either way, please file a bug in Issuezilla!



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