diff tests/run-tests.py @ 31746:728d37353e1e

run-tests: auto-replace 'TXNID' output Hooks related to the transaction are aware of the transaction id. By definition this txn-id is unique and different for each transaction. As a result it can never be predicted in test and always needs matching. As a result, touching any like with this data is annoying. We solve the problem once and for all by installing an automatic replacement. In test, this will now show as: TXNID=TXN:$ID$
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 30 Mar 2017 17:29:03 +0200
parents 6a2959acae1a
children 220d4bffd23e
line wrap: on
line diff
--- a/tests/run-tests.py	Sat Apr 01 02:32:49 2017 +0900
+++ b/tests/run-tests.py	Thu Mar 30 17:29:03 2017 +0200
@@ -848,6 +848,7 @@
             (br'(?m)^(saved backup bundle to .*\.hg)( \(glob\))?$',
              br'\1 (glob)'),
             (br'([^0-9])%s' % re.escape(self._localip()), br'\1$LOCALIP'),
+            (br'\bHG_TXNID=TXN:[a-f0-9]{40}\b', br'HG_TXNID=TXN:$ID$'),
             ]
         r.append((self._escapepath(self._testtmp), b'$TESTTMP'))