[PATCH 2 of 2 STABLE resend] keyword: make status test after record and kwexpand/kwshrink reliable

Matt Mackall mpm at selenic.com
Thu Sep 8 14:16:55 CDT 2011


On Thu, 2011-09-08 at 19:33 +0100, Christian Ebert wrote:
> # HG changeset patch
> # User Christian Ebert <blacktrash at gmx.net>
> # Date 1315506672 -3600
> # Node ID 90dbf177b83584a5623fdc8d9dc297a5a869960a
> # Parent  1e6056cf1f266f91c703c38dbb24a1b854752bbd
> keyword: make status test after record and kwexpand/kwshrink reliable
> 
> This guarantees test failure when the dirstate code is omitted at
> the end of the kwtemplater.overwrite method.
> 
> kwexpand/kwshrink:
> Without a 1 second wait the test succeeds sometimes, even when
> the dirstate of the overwritten file is not forced to normal.
> 
> record:
> status after recording an added file allows to check whether
> normallookup is needed after overwriting.

This looks highly suspect: we've gone to a great deal of effort to make
these one second sleeps unnecessary. What's going on here?

> diff --git a/tests/test-keyword.t b/tests/test-keyword.t
> --- a/tests/test-keyword.t
> +++ b/tests/test-keyword.t
> @@ -444,6 +444,7 @@
>    r
>    committed changeset 3:899491280810
>    overwriting r expanding keywords
> +  $ hg status r
>    $ hg --verbose rollback
>    repository tip rolled back to revision 2 (undo commit)
>    working directory now based on revision 2
> @@ -834,6 +835,7 @@
>    $ hg copy a x/a
>    $ hg --verbose kwshrink a
>    overwriting a shrinking keywords
> +  $ sleep 1
>    $ hg status a
>    $ hg --verbose kwexpand a
>    overwriting a expanding keywords
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list