pull: Make fetcher work for file:/// URIs too

Even if very suboptimally, for now; we copy the files, then copy them
again.

The obvious long term plan is to merge pull-local and pull together,
but truly optimizing that requires the pull code to know how to use
the OstreeRepo APIs when operating on local repositories (as
pull-local does), rather than assuming the remote is an archive-z
fetched over HTTP.
This commit is contained in:
Colin Walters committed 2013-07-01 22:43:17 -04:00
1 parent dc0f3c3dcb
commit a93f2b8d16
2 files changed
+46 -29

No files matched your search

+11
View File
@@ -39,6 +39,8 @@ cd ${test_tmpdir}
${CMD_PREFIX} ostree --repo=repo2 checkout test2 test2-checkout-from-local-clone
cd test2-checkout-from-local-clone
assert_file_has_content baz/cow moo
cd ${test_tmpdir}
rm repo2 -rf
echo "ok local clone checkout"
$OSTREE checkout -U test2 checkout-user-test2
@@ -64,3 +66,12 @@ echo "ok cat-file"
cd ${test_tmpdir}
$OSTREE fsck
echo "ok fsck"
cd ${test_tmpdir}
mkdir repo2
${CMD_PREFIX} ostree --repo=repo2 init
${CMD_PREFIX} ostree --repo=repo2 remote add aremote file://$(pwd)/repo test2
ostree --repo=repo2 pull aremote
ostree --repo=repo2 rev-parse aremote/test2
ostree --repo=repo2 fsck
echo "ok pull with from file:/// uri"