# HG changeset patch # User FUJIWARA Katsunori # Date 1454923757 -32400 # Node ID e7ff258f71df0f19977be1e07ddfbf52f30c34fa # Parent 0707bbec682d7cb12b9ce0979f7c018d091d1836 tests: make timezone in diff output glob-ed for portability Before this patch, some tests using external "diff" command via extdiff extension fail on Solaris, because system standard "diff" (= /usr/bin/diff) on Solaris doesn't display timezone for timestamp of each files in diff output. This patch makes timezone in external diff output glob-ed for portability of tests, and adds check-code.py a rule to detect such diff -r 0707bbec682d -r e7ff258f71df contrib/check-code.py --- a/contrib/check-code.py Mon Feb 08 18:29:17 2016 +0900 +++ b/contrib/check-code.py Mon Feb 08 18:29:17 2016 +0900 @@ -178,6 +178,8 @@ 'use test -f to test for file existence'), (r'^ diff -[^ -]*p', "don't use (external) diff with -p for portability"), + (r'^ [-+][-+][-+] .* [-+]0000 \(glob\)', + "glob timezone field in diff output for portability"), ], # warnings [ diff -r 0707bbec682d -r e7ff258f71df tests/test-add.t --- a/tests/test-add.t Mon Feb 08 18:29:17 2016 +0900 +++ b/tests/test-add.t Mon Feb 08 18:29:17 2016 +0900 @@ -226,7 +226,7 @@ $ hg diff capsdir1/capsdir diff -r * CapsDir1/CapsDir/SubDir/Def.txt (glob) --- a/CapsDir1/CapsDir/SubDir/Def.txt Thu Jan 01 00:00:00 1970 +0000 - +++ b/CapsDir1/CapsDir/SubDir/Def.txt * +0000 (glob) + +++ b/CapsDir1/CapsDir/SubDir/Def.txt * (glob) @@ -1,1 +1,1 @@ -xyz +def diff -r 0707bbec682d -r e7ff258f71df tests/test-graft.t --- a/tests/test-graft.t Mon Feb 08 18:29:17 2016 +0900 +++ b/tests/test-graft.t Mon Feb 08 18:29:17 2016 +0900 @@ -349,8 +349,8 @@ [255] $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 - --- */hg-5c095ad7e90f.patch * +0000 (glob) - +++ */hg-7a4785234d87.patch * +0000 (glob) + --- */hg-5c095ad7e90f.patch * (glob) + +++ */hg-7a4785234d87.patch * (glob) @@ -1,18 +1,18 @@ # HG changeset patch -# User test @@ -380,8 +380,8 @@ [1] $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . - --- */hg-5c095ad7e90f.patch * +0000 (glob) - +++ */hg-7a4785234d87.patch * +0000 (glob) + --- */hg-5c095ad7e90f.patch * (glob) + +++ */hg-7a4785234d87.patch * (glob) @@ -1,8 +1,8 @@ # HG changeset patch -# User test diff -r 0707bbec682d -r e7ff258f71df tests/test-subrepo-deep-nested-change.t --- a/tests/test-subrepo-deep-nested-change.t Mon Feb 08 18:29:17 2016 +0900 +++ b/tests/test-subrepo-deep-nested-change.t Mon Feb 08 18:29:17 2016 +0900 @@ -721,14 +721,14 @@ $ hg --config extensions.extdiff= extdiff -r '.^' -S diff -Nru cloned.*/.hgsub cloned/.hgsub (glob) - --- cloned.*/.hgsub * +0000 (glob) - +++ cloned/.hgsub * +0000 (glob) + --- cloned.*/.hgsub * (glob) + +++ cloned/.hgsub * (glob) @@ -1,2 +1 @@ sub1 = ../sub1 -sub3 = sub3 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob) - --- cloned.*/.hgsubstate * +0000 (glob) - +++ cloned/.hgsubstate * +0000 (glob) + --- cloned.*/.hgsubstate * (glob) + +++ cloned/.hgsubstate * (glob) @@ -1,2 +1 @@ 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3