Commit Graph

4 Commits

Author SHA1 Message Date
David Soria Parra
b0d59e858a p4fastimport: implement transaction.find and .replace
Summary:
revlog uses transaction.find and transaction.replace in cases where a
datafile is separated from an index (>= revlog._maxinline). In these cases the
importer broke as we did not implement find and replace in filetransaction.

We implement the two methods. However we ned a save way to store the data
portion which find must correclty return. We cannot store json as some
serializations aren't bidirecitonal. We can't store pickle as \n is a common
separator in pickle, and we use that to separate our entries. So we use pickle
and then base64 encode it. This is cumbersome but works.

The fix is aimed to make things "work" and I want to explore options to better
implement find and replace.

Test Plan:
- Working on a test that correclty triggers inline -> separation.
- Deployed it to our test system with test data and see commits comming in.

Reviewers: #idi, #ovrsource_warroom, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D5189308
2017-06-06 19:54:29 -07:00
Durham Goode
e34660b057 commands: update to use registrar instead of cmdutil
Summary: Upstream has deprecated cmdutil.commands() in favor of registrar.commands()

Test Plan: Ran the tests

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:5106486:1495485074:0e20f00622cc651e8c9dda837f84dd84cc51099e
2017-05-22 13:38:37 -07:00
David Soria Parra
aca5b8465c p4fastimport: filelog transaction wtih support for concurrent access
Summary:
We are adding a simple transaction that works only with filelogs but
allows for concurrent access from multiple workers. This allows for a proper
rollback in case of a failure in a worker process, which previously would result
in bad data in the repositoriy.

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

Reviewers: #mercurial, durham, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:5070340:1494958313:b10b1eac5b42b36d1a587c4ae1c95fc2f8b5ad35
2017-05-16 12:36:23 -07:00
David Soria Parra
07292913da p4fastimport: move p4fastimport under hgext3rd
Summary:
move p4fastimport under hgext3rd as that's where it belongs.
Also has the benefit that we package it up.

Test Plan: rt test-p4*

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:5056664:1494631758:4892f47922d8fbbd2c1f7793f3f29ee73fa8fa42
2017-05-12 17:03:20 -07:00