Patchwork D3025: tests: don't use revlog paths in tests

login
register
mail settings
Submitter phabricator
Date April 3, 2018, 3:53 a.m.
Message ID <differential-rev-PHID-DREV-kjd52fg7wt5lhff4ujve-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30151/
State Superseded
Headers show

Comments

phabricator - April 3, 2018, 3:53 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Debug commands operating on revlogs don't need the full revlog
  path: they can accept the relative path to a tracked file or use
  -c/-m to specify a changelog or manifest.
  
  Not using the revlog path makes tests more resilient to cases
  where revlogs aren't being used for storage.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-annotate.t
  tests/test-debugindexdot.t
  tests/test-lfs-test-server.t
  tests/test-parseindex.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-parseindex.t b/tests/test-parseindex.t
--- a/tests/test-parseindex.t
+++ b/tests/test-parseindex.t
@@ -143,11 +143,11 @@ 
   >     open(n + "/.hg/store/00changelog.i", "wb").write(d)
   > EOF
 
-  $ hg debugindex -f1 limit/.hg/store/00changelog.i
+  $ hg -R limit debugindex -f1 -c
      rev flag   offset   length     size   base   link     p1     p2       nodeid
        0 0000        0       63       62      0      0      2     -1 7c31755bf9b5
        1 0000       63       66       65      1      1      0      2 26333235a41c
-  $ hg debugindex -f1 segv/.hg/store/00changelog.i
+  $ hg -R segv debugindex -f1 -c
      rev flag   offset   length     size   base   link     p1     p2       nodeid
        0 0000        0       63       62      0      0  65536     -1 7c31755bf9b5
        1 0000       63       66       65      1      1      0  65536 26333235a41c
diff --git a/tests/test-lfs-test-server.t b/tests/test-lfs-test-server.t
--- a/tests/test-lfs-test-server.t
+++ b/tests/test-lfs-test-server.t
@@ -823,7 +823,7 @@ 
   $ hg commit -m 'test'
   $ echo aaaaa > a
   $ hg commit -m 'largefile'
-  $ hg debugdata .hg/store/data/a.i 1 # verify this is no the file content but includes "oid", the LFS "pointer".
+  $ hg debugdata a 1 # verify this is no the file content but includes "oid", the LFS "pointer".
   version https://git-lfs.github.com/spec/v1
   oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a
   size 6
diff --git a/tests/test-debugindexdot.t b/tests/test-debugindexdot.t
--- a/tests/test-debugindexdot.t
+++ b/tests/test-debugindexdot.t
@@ -13,7 +13,7 @@ 
   $ HGMERGE=true hg merge -q
   $ hg ci -m merge -d '3 0'
 
-  $ hg debugindexdot .hg/store/data/a.i
+  $ hg debugindexdot a
   digraph G {
   	-1 -> 0
   	0 -> 1
diff --git a/tests/test-annotate.t b/tests/test-annotate.t
--- a/tests/test-annotate.t
+++ b/tests/test-annotate.t
@@ -456,7 +456,7 @@ 
   > EOF
   $ hg debugsetparents 17 17
   $ hg --config extensions.legacyrepo=../legacyrepo.py  commit -m "baz:2"
-  $ hg debugindexdot .hg/store/data/baz.i
+  $ hg debugindexdot baz
   digraph G {
   	-1 -> 0
   	0 -> 1
@@ -488,7 +488,7 @@ 
   > EOF
   $ hg debugsetparents 19 18
   $ hg --config extensions.legacyrepo=../legacyrepo.py  commit -m "baz:4"
-  $ hg debugindexdot .hg/store/data/baz.i
+  $ hg debugindexdot baz
   digraph G {
   	-1 -> 0
   	0 -> 1