Commit Graph

9 Commits

Author SHA1 Message Date
Jun Wu
a9d4c07ef8 p4fastimport: use verify.skipflags in lfs test
Summary:
The newly added config option could skip LFS revision checks. Let's use it
so `hg verify` passes.

Test Plan: arc unit

Reviewers: #mercurial, davidsp

Reviewed By: davidsp

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5091709

Signature: t1:5091709:1495163508:3f36dfa221ab0896e1dc49d30c762d7957ac9826
2017-05-18 22:21:34 -07:00
Jun Wu
c44498aaa8 p4fastimport: update test to reflect upstream changes
Summary: Upstream has changed the debug output. Let's update our tests.

Test Plan: arc unit

Reviewers: #mercurial, davidsp

Reviewed By: davidsp

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5090773

Signature: t1:5090773:1495144947:2b82d897577277cdbc454418a40353c685b742dd
2017-05-18 15:19:14 -07:00
Jun Wu
a94a1bd72a p4fastimport: extract common logic from tests
Summary:
This diff adds a shared `p4setup.sh` that de-duplicates common logic among
tests. It also uses absolute path to make sure the extension being tested is
the version being developed.

The LFS test is also workarounded temporarily waiting for upstream change.

Test Plan: Run existing tests

Reviewers: #mercurial, davidsp

Reviewed By: davidsp

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5049279

Signature: t1:5049279:1494547832:28222fd2034115faca73860d6dd2f19206701aaa
2017-05-11 17:13:31 -07:00
Jun Wu
8909f8ded8 lfs: remove lfs.blobstore option
Summary:
`lfs.blobstore` is a path used to store local blobs. Some of the blobs are not
uploaded yet so they couldn't be easily discarded. Although blobs downloaded
from the server could be removed if necessary.

It does not make much sense to make this a config option - the data should be
stored reliably. It's also dangerous to allow write to arbitrary paths under
`repo.vfs`.

This diff makes the local blob store fixed path at `.hg/store/lfs/objects`.
The choice is similar to `.git/lfs/objects`, but with `store`, shared repo
could share their lfs stores.

Test Plan: Modified existing test.

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5009664

Signature: t1:5009664:1493978440:c3f6351d0ea0cca2ce3caa9f7260c5d65bcc0e5f
2017-05-08 11:21:34 -07:00
David Soria Parra
fc6dc3be52 p4fastimport: adding debug message to filelog loading
Summary: Add debug output while loading filelogs when --debug is passed.

Test Plan: rt test-check* test-p4*

Reviewers: #sourcecontrol, #idi, ikostia

Reviewed By: ikostia

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4963656

Signature: t1:4963656:1493315731:f2b28dd06e4611d74e039d8b7805f72eb1bc16e4
2017-05-01 20:43:11 -07:00
David Soria Parra
0337eae344 p4fastimport: correct PYTHONPATH for tests
Summary:
correct PYTHONPATH to allow running tests without having to
source hg-dev. This was suggested by @durham

Test Plan: rt tests-p4*

Reviewers: #sourcecontrol, #idi, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters, durham

Differential Revision: https://phabricator.intern.facebook.com/D4921199

Signature: t1:4921199:1492696261:ca70d837a9f273433b21fb10e3f4ff1afc6a5698
2017-04-25 15:29:39 +01:00
David Soria Parra
78dcff9f00 p4fastimport: support client view
Summary:
Perforce client support a view. A view maps a server side path to a client side
path, e.g.: the view '//depot/A/B/... //myclient/foo/...' maps every file in
//depot/A/B/ on the server side to a local checkout foo/ inside the root for
checkouts defined for the client 'myclient'.
We are using §p4 where§ to support these mappings. We do the mapping inside the
FileImporter at the moment as this runs nicely in parallel. It's a bit hacky
but get's the job done. We use this mostly to ommit the common prefix
//depot/... and remove branch indicators such as Main.

So in our case a view looks like

  //depot/Software/OculusSDK/PC/Main... //client/Software/OculusSDK/PC/...

resulting in a file

  //depot/Software/OculusSDK/PC/Main/test.txt

being imported as

  Software/OculusSDK/PC/test.xt

Test Plan: rt test-p4*

Reviewers: #sourcecontrol, #idi, ikostia

Reviewed By: ikostia

Subscribers: ikostia, durham, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4913483

Signature: t1:4913483:1492702356:b97b691343b8a1d52940445934730b31d411db4c
2017-04-25 15:29:39 +01:00
David Soria Parra
2ab5a0baf8 p4fastimport: support for writing LFS metadata to sqlite
Summary:
We do not write the blobs to local cache anymore. We want our LFS
server to import them from Perforce directly or serve them from Perforce
directly. In order to do so, we need the correct mapping from oid to perforce
file + cl. This is generally useful metainformation that other LFS
implementation can use. We simple write the data to sqlite because it's simple
and built in.

Test Plan: rt test-p4*

Reviewers: #sourcecontrol, #idi, quark

Reviewed By: quark

Subscribers: quark, durham, wlis, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4913469

Signature: t1:4913469:1492796253:1e3b389c7cb0ba3acf9504410d267a1cf9651118
2017-04-25 15:29:39 +01:00
David Soria Parra
7d78fa39bf p4fastimport: initial support for writing lfs metadata
Summary:
Add a special mode to the importer that patches the LFS extension to
not write blobs to local disc. In our case we do have the files already in
Perforce and do not have to write them again to disk. This is currently breaking
verify and therefore we are patching verify.

Test Plan: rt test-p4*

Reviewers: #sourcecontrol, #idi, durham, quark

Reviewed By: quark

Subscribers: quark, durham, wlis, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4913455

Signature: t1:4913455:1492979419:204c1075376fe975ddea880b22e6984684e7ff25
2017-04-25 15:29:39 +01:00