Patchwork D8734: tests: avoid a "magic" nodeid in test-wireproto-command-lookup.t

login
register
mail settings
Submitter phabricator
Date July 14, 2020, 4:37 a.m.
Message ID <differential-rev-PHID-DREV-b76kvdexl5tfnrspoiuj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46719/
State Superseded
Headers show

Comments

phabricator - July 14, 2020, 4:37 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This helps with readability.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8734

AFFECTED FILES
  tests/test-wireproto-command-lookup.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-wireproto-command-lookup.t b/tests/test-wireproto-command-lookup.t
--- a/tests/test-wireproto-command-lookup.t
+++ b/tests/test-wireproto-command-lookup.t
@@ -15,6 +15,7 @@ 
   > |
   > A
   > EOF
+  $ root_node=$(hg log -r A -T '{node}')
 
   $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log
   $ cat hg.pid > $DAEMON_PIDS
@@ -23,7 +24,7 @@ 
 
   $ sendhttpv2peer << EOF
   > command lookup
-  >     key 426bada5c67598ca65036d57d9e4b64b0c1ce7a0
+  >     key $root_node
   > EOF
   creating http peer for wire protocol version 2
   sending lookup command