D926: test-setdiscovery: make test compatible with chg
singhsrb (Saurabh Singh)
phabricator at mercurial-scm.org
Tue Oct 3 20:32:12 UTC 2017
singhsrb created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
The test checks the output of the blackbox extension which will
contain logs corresponding to chg in case chg is running. Therefore, this
commit modifies the test to take chg into consideration while working with the
blackbox extension.
TEST PLAN
Ran the test 'test-setdiscovery.t' with and without the '--chg'
option.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D926
AFFECTED FILES
tests/test-setdiscovery.t
CHANGE DETAILS
diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
--- a/tests/test-setdiscovery.t
+++ b/tests/test-setdiscovery.t
@@ -402,9 +402,20 @@
comparing with r2
searching for changes
101 102 103 104 105 106 107 108 109 110 (no-eol)
+#if no-chg
$ hg -R r1 --config extensions.blackbox= blackbox
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> outgoing r2 *-T{rev} * (glob)
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 2 roundtrips in *.????s (glob)
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> blackbox (glob)
+#else
+The first line of blackbox output will correspond to the chg master server.
+Therefore, glob first line when chg is running.
+ $ hg -R r1 --config extensions.blackbox= blackbox
+ * (glob)
+ * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> outgoing r2 *-T{rev} * (glob)
+ * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 2 roundtrips in *.????s (glob)
+ * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
+ * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> blackbox (glob)
+#endif
$ cd ..
To: singhsrb, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list