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

Christian Ebert blacktrash at gmx.net
Fri Sep 9 17:44:56 CDT 2011


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1315608241 -3600
# Branch stable
# Node ID 5da076f8ef20841e49edc4c670c3247f7dd5a07b
# Parent  ad6eb7d7dbcafac0614e884222d182187fbfec6e
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.

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


More information about the Mercurial-devel mailing list