tests: don't use revlog paths in tests
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 02 Apr 2018 15:55:50 -0700
changeset 37280 435481393198
parent 37279 26f6fc179e62
child 37281 806b07d7c7d6
tests: don't use revlog paths in tests 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. Differential Revision: https://phab.mercurial-scm.org/D3025
tests/test-annotate.t
tests/test-debugindexdot.t
tests/test-lfs-test-server.t
tests/test-parseindex.t
--- a/tests/test-annotate.t	Sat Mar 17 21:03:16 2018 +0900
+++ b/tests/test-annotate.t	Mon Apr 02 15:55:50 2018 -0700
@@ -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
--- a/tests/test-debugindexdot.t	Sat Mar 17 21:03:16 2018 +0900
+++ b/tests/test-debugindexdot.t	Mon Apr 02 15:55:50 2018 -0700
@@ -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
--- a/tests/test-lfs-test-server.t	Sat Mar 17 21:03:16 2018 +0900
+++ b/tests/test-lfs-test-server.t	Mon Apr 02 15:55:50 2018 -0700
@@ -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
--- a/tests/test-parseindex.t	Sat Mar 17 21:03:16 2018 +0900
+++ b/tests/test-parseindex.t	Mon Apr 02 15:55:50 2018 -0700
@@ -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