Patchwork D11005: remotefilelog: tweak corrupt cache test to grep more flexibly

login
register
mail settings
Submitter phabricator
Date July 7, 2021, 6:12 p.m.
Message ID <differential-rev-PHID-DREV-bmfeb6lf3lxvacsjueeu-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49319/
State Superseded
Headers show

Comments

phabricator - July 7, 2021, 6:12 p.m.
durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I'm about to fix the abuse of RuntimeError here, which breaks the test
  if I don't do this.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-remotefilelog-corrupt-cache.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-remotefilelog-corrupt-cache.t b/tests/test-remotefilelog-corrupt-cache.t
--- a/tests/test-remotefilelog-corrupt-cache.t
+++ b/tests/test-remotefilelog-corrupt-cache.t
@@ -37,7 +37,7 @@ 
   > EOF
   $ chmod u+w $CACHEDIR/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0
   $ echo x > $CACHEDIR/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0
-  $ hg up tip 2>&1 | egrep "^RuntimeError"
+  $ hg up tip 2>&1 | egrep "^[^ ].*unexpected remotefilelog"
   RuntimeError: unexpected remotefilelog header: illegal format
 
 Verify detection and remediation when remotefilelog.validatecachelog is set