# HG changeset patch # User Augie Fackler # Date 2018-10-04 03:47:43 # Node ID b6b2a3d223448057c88740217b7de2fa5ff8214e # Parent 64b16de2c66a53a1007db2e15c8972f895e5977c remotefilelog: avoid hard-coding pack names in tests I'm about to alter the pack format, which alters the content-addressed name of the pack file. In order to reduce my own confusion I found it helpful to use an ls | head pipeline since we always want to inspect the newest pack. Differential Revision: https://phab.mercurial-scm.org/D4942 diff --git a/tests/test-remotefilelog-bgprefetch.t b/tests/test-remotefilelog-bgprefetch.t --- a/tests/test-remotefilelog-bgprefetch.t +++ b/tests/test-remotefilelog-bgprefetch.t @@ -153,7 +153,7 @@ # Ensure that file 'w' was prefetched - it was not part of the update operation and therefore # could only be downloaded by the background prefetch - $ hg debugdatapack $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0: w: Node Delta Base Delta Length Blob Size @@ -205,7 +205,7 @@ # Ensure that file 'w' was prefetched - it was not part of the commit operation and therefore # could only be downloaded by the background prefetch - $ hg debugdatapack $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0: w: Node Delta Base Delta Length Blob Size @@ -248,7 +248,7 @@ # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore # could only be downloaded by the background prefetch - $ hg debugdatapack $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0: w: Node Delta Base Delta Length Blob Size @@ -295,7 +295,7 @@ $TESTTMP/hgcache/repos # Ensure that files were prefetched - $ hg debugdatapack $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0: w: Node Delta Base Delta Length Blob Size @@ -339,7 +339,7 @@ $TESTTMP/hgcache/repos # Ensure that files were prefetched - $ hg debugdatapack $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/8299d5a1030f073f4adbb3b6bd2ad3bdcc276df0: w: Node Delta Base Delta Length Blob Size diff --git a/tests/test-remotefilelog-gcrepack.t b/tests/test-remotefilelog-gcrepack.t --- a/tests/test-remotefilelog-gcrepack.t +++ b/tests/test-remotefilelog-gcrepack.t @@ -50,7 +50,7 @@ # Ensure that all file versions were prefetched - $ hg debugdatapack $TESTTMP/hgcache/master/packs/f7a942a6e4673d2c7b697fdd926ca2d153831ca4.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/f7a942a6e4673d2c7b697fdd926ca2d153831ca4: x: Node Delta Base Delta Length Blob Size @@ -84,7 +84,7 @@ # Ensure that file 'x' was garbage collected. It should be GCed because it is not in the keepset # and is old (commit date is 0.0 in tests). Ensure that file 'y' is present as it is in the keepset. - $ hg debugdatapack $TESTTMP/hgcache/master/packs/05baa499c6b07f2bf0ea3d2c8151da1cb86f5e33.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/05baa499c6b07f2bf0ea3d2c8151da1cb86f5e33: y: Node Delta Base Delta Length Blob Size @@ -111,7 +111,7 @@ # Ensure that all file versions were prefetched - $ hg debugdatapack $TESTTMP/hgcache/master/packs/f7a942a6e4673d2c7b697fdd926ca2d153831ca4.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/f7a942a6e4673d2c7b697fdd926ca2d153831ca4: x: Node Delta Base Delta Length Blob Size @@ -145,7 +145,7 @@ # Ensure that all file versions were prefetched - $ hg debugdatapack $TESTTMP/hgcache/master/packs/f7a942a6e4673d2c7b697fdd926ca2d153831ca4.datapack + $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` $TESTTMP/hgcache/master/packs/f7a942a6e4673d2c7b697fdd926ca2d153831ca4: x: Node Delta Base Delta Length Blob Size