From patchwork Wed Aug 25 09:41:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D11337: clone: automatically glob stream clone output in test From: phabricator X-Patchwork-Id: 49652 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 25 Aug 2021 09:41:32 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Touching `test-clone-stream.t` is very painful otherwise. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11337 AFFECTED FILES tests/common-pattern.py tests/test-clone-stream.t CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/tests/test-clone-stream.t b/tests/test-clone-stream.t --- a/tests/test-clone-stream.t +++ b/tests/test-clone-stream.t @@ -331,9 +331,9 @@ $ hg clone --stream -U http://localhost:$HGPORT clone1 streaming all changes 1089 files to transfer, 101 KB of data (no-zstd !) - transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) + transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) 1089 files to transfer, 98.5 KB of data (zstd !) - transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) + transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !) searching for changes no changes found $ cat server/errors.txt @@ -342,7 +342,7 @@ $ hg clone --stream -U http://localhost:$HGPORT clone1 streaming all changes 1092 files to transfer, 101 KB of data (no-zstd !) - transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) + transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) 1092 files to transfer, 98.6 KB of data (zstd !) transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) @@ -454,9 +454,9 @@ $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed streaming all changes 1089 files to transfer, 101 KB of data (no-zstd !) - transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) + transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) 1089 files to transfer, 98.5 KB of data (zstd !) - transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) + transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !) searching for changes no changes found #endif @@ -482,8 +482,8 @@ 1089 files to transfer, 98.5 KB of data (zstd !) starting 4 threads for background file closing updating the branch cache - transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) - transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) + transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) + transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !) query 1; heads sending batch command searching for changes @@ -551,9 +551,9 @@ $ hg clone --stream -U http://localhost:$HGPORT secret-allowed streaming all changes 1089 files to transfer, 101 KB of data (no-zstd !) - transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) + transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) 1089 files to transfer, 98.5 KB of data (zstd !) - transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) + transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !) searching for changes no changes found #endif @@ -744,9 +744,9 @@ $ hg clone --stream http://localhost:$HGPORT phase-publish streaming all changes 1089 files to transfer, 101 KB of data (no-zstd !) - transferred 101 KB in * seconds (*) (glob) (no-zstd !) + transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) 1089 files to transfer, 98.5 KB of data (zstd !) - transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) + transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !) searching for changes no changes found updating to branch default @@ -793,7 +793,7 @@ 1089 files to transfer, 101 KB of data (no-zstd !) transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) 1089 files to transfer, 98.5 KB of data (zstd !) - transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) + transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !) searching for changes no changes found updating to branch default diff --git a/tests/common-pattern.py b/tests/common-pattern.py --- a/tests/common-pattern.py +++ b/tests/common-pattern.py @@ -115,6 +115,14 @@ br'(.*file:/)/?(/\$TESTTMP.*)', lambda m: m.group(1) + b'*' + m.group(2) + b' (glob)', ), + # `hg clone --stream` output + ( + br'transferred (\S+?) KB in \S+? seconds \(.+?/sec\)(?: \(glob\))?(.*)', + lambda m: ( + br'transferred %s KB in * seconds (* */sec) (glob)%s' + % (m.group(1), m.group(2)) + ), + ), ] # Various platform error strings, keyed on a common replacement string