git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Intermittent failures in t9119

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2010, 20:39 UTC
Message-ID
<7vy684t0mt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vmxoml1p7.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 26 quoted lines
> Sorry for bringing up an old story, but since you added "git svn info"
> with e6fefa9 (git-svn info: implement info command, 2007-11-21),...
>
> I am seeing breakages from the said test:
>
>     not ok - 6 info file
>     #
>     #               (cd svnwc; svn info file) > expected.info-file &&
>     #               (cd gitwc; git svn info file) > actual.info-file &&
>     #               test_cmp expected.info-file actual.info-file
>
>     : trash directory.t9119-git-svn-info/master; diff *.info-file
>     12c12
>     < Text Last Updated: 2010-12-04 00:34:58 +0000 (Sat, 04 Dec 2010)
>     ---
>     > Text Last Updated: 2010-12-04 00:34:57 +0000 (Sat, 04 Dec 2010)
>
> I do not know if we should expect output from "svn info" to match exactly
> like the above.  Is "Text Last Updated" supposed to show the stat
> timestamp of the working tree (I see "(stat $path)[9]" there)?
> ...
>
> I _think_ "svn info file" actually gives the timestamp of the revision
> that touched the file the last (in their linear worldview of the history),
> so perhaps this is demonstrating the real bug, but only when the test runs
> very slowly?

I think we should not expect "git svn info" to match "svn info" at least at the "Text Last Updated" line. The former seems to want to report the timestamp of the working tree, but "svn info" does not seem to look at the file in the working tree.

    $ mkdir svntest
    $ cd svntest
    $ mkdir repo
    $ svnadmin create repo
    $ svn checkout file://$(pwd)/repo work
    Checked out revision 0.
    $ cd work
    $ echo hello >world; svn add world; svn commit -m initial
    A         world
    Adding         world
    Transmitting file data .
    Committed revision 1.
    $ svn info world | grep 'Text Last'
    Text Last Updated: 2010-12-05 12:24:52 -0800 (Sun, 05 Dec 2010)
    $ touch world
    $ svn info world | grep 'Text Last'
    Text Last Updated: 2010-12-05 12:24:52 -0800 (Sun, 05 Dec 2010)
    $ ls -l world
    -rw-rw-r-- 1 junio junio 6 2010-12-05 12:25 world
    $ rm world
    $ svn info world | grep 'Text Last'
    Text Last Updated: 2010-12-05 12:24:52 -0800 (Sun, 05 Dec 2010)
I have these suspicions:
 (1) Somebody may have liked if "git svn info" exactly matched "svn info"
     in that it would give the timestamp of the commit object that touched
     the path the last in the current history.  The current implementation
     in that sense is buggy;
 (2) Nobody uses the value from "Text Last Updated" field in practice, so
     that bug has been unnoticed so far;
 (3) And it is not worth fixing it ;-)

For now, I would suggest fixing the failing test to ignore the "Text Last Updated" field while comparing, and if somebody is inclined to, we would update the code to match what "svn info" does.

Thoughts?
Previous: Junio C HamanoNext: Eric Wong
Message 4 of 8 in “Intermittent failures in t9119”
  1. Junio C HamanoDec 4, 2010
  2. David D. KilzerDec 5, 2010
  3. Junio C HamanoDec 5, 2010
  4. Junio C HamanoDec 5, 2010
  5. Eric WongDec 6, 2010
  6. Junio C HamanoDec 7, 2010
  7. Eric WongDec 9, 2010
  8. David D. KilzerDec 31, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.