mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
remotefilelog: add debug command to fetch multiple files over HTTP
Summary: Previously, `hg debuggetfile` would allow fetching a single file from the API server. This diff updates the command to `hg debuggetfiles`, which accepts a list of filenode/path pairs on stdin, and fetches all the files concurrently, writing the contents to a single datapack. Reviewed By: DurhamG Differential Revision: D13893894 fbshipit-source-id: 36fc54f1870273ab4b447de5d615b3fb6aaa3378
This commit is contained in:
parent
c173d738ee
commit
1f6389a3da
@ -44,21 +44,19 @@ Check that the API server is alive.
|
||||
successfully connected to: http://localhost:* (glob)
|
||||
|
||||
Test fetching file contents
|
||||
$ hg debuggetfile $TEST_FILENODE test.txt
|
||||
wrote file to datapack: $TESTTMP/cachepath/repo/packs/a44185ec32ce585111e25184353e865695177464
|
||||
$ hg debuggetfile <<EOF
|
||||
> $TEST_FILENODE test.txt
|
||||
> $COPY_FILENODE test2.txt
|
||||
> EOF
|
||||
wrote datapack: $TESTTMP/cachepath/repo/packs/05a5c5f239f359ccf6200acfa30af03cf77b174f
|
||||
|
||||
Verify contents
|
||||
$ hg debugdatapack $TESTTMP/cachepath/repo/packs/a44185ec32ce585111e25184353e865695177464 --node $TEST_FILENODE
|
||||
$TESTTMP/cachepath/repo/packs/a44185ec32ce585111e25184353e865695177464:
|
||||
$ hg debugdatapack $TESTTMP/cachepath/repo/packs/05a5c5f239f359ccf6200acfa30af03cf77b174f --node $TEST_FILENODE
|
||||
$TESTTMP/cachepath/repo/packs/05a5c5f239f359ccf6200acfa30af03cf77b174f:
|
||||
test content
|
||||
|
||||
Test fetching contents of copied file
|
||||
$ hg debuggetfile $COPY_FILENODE test2.txt
|
||||
wrote file to datapack: $TESTTMP/cachepath/repo/packs/a6bab15ad2170bfde7adba357474fc96d14a17db
|
||||
|
||||
Verify contents (note that copyinfo is present)
|
||||
$ hg debugdatapack $TESTTMP/cachepath/repo/packs/a6bab15ad2170bfde7adba357474fc96d14a17db --node $COPY_FILENODE
|
||||
$TESTTMP/cachepath/repo/packs/a6bab15ad2170bfde7adba357474fc96d14a17db:
|
||||
$ hg debugdatapack $TESTTMP/cachepath/repo/packs/05a5c5f239f359ccf6200acfa30af03cf77b174f --node $COPY_FILENODE
|
||||
$TESTTMP/cachepath/repo/packs/05a5c5f239f359ccf6200acfa30af03cf77b174f:
|
||||
\x01 (esc)
|
||||
copy: test.txt
|
||||
copyrev: 186cafa3319c24956783383dc44c5cbc68c5a0ca
|
||||
|
Loading…
Reference in New Issue
Block a user