# HG changeset patch # User Christian Ebert # Date 2011-09-10 12:23:41 # Node ID 77325c92db951e6bcc8a866fb1139178b968d5a2 # Parent 64fbd0de97730ab2ccd288c150d6ca03de3a9cec 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,8 @@ record added file alone r committed changeset 3:899491280810 overwriting r expanding keywords + - status call required for dirstate.normallookup() check + $ hg status r $ hg --verbose rollback repository tip rolled back to revision 2 (undo commit) working directory now based on revision 2 @@ -834,6 +836,8 @@ kwexpand/kwshrink on selected files $ hg copy a x/a $ hg --verbose kwshrink a overwriting a shrinking keywords + - sleep required for dirstate.normal() check + $ sleep 1 $ hg status a $ hg --verbose kwexpand a overwriting a expanding keywords