( )⚙ D1743 p4fastimport: allow sync commits only when imported repository is up-to-date

This is an archive of the discontinued Mercurial Phabricator instance.

p4fastimport: allow sync commits only when imported repository is up-to-date
AcceptedPublic

Authored by dsp on Dec 21 2017, 8:18 PM.
Tags
None
Subscribers

Details

Reviewers
kaleyh
Summary

Previously we allowed a sync commit to happen at any time, but imported the
full repository to bring it into sync. This is slow for very large repositories
and might be accidentally triggered. We change this behavior to only do a sync
commit if only the imported client changed but nothing else.

Test Plan
cd tests
python ../../hg-crew/tests/run-tests.py test-p4fastimport-*.t test-check*.t

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

dsp created this revision.Dec 21 2017, 8:18 PM
kaleyh requested changes to this revision.Dec 22 2017, 5:37 PM
kaleyh added a subscriber: kaleyh.
kaleyh added inline comments.
tests/test-p4fastimport-blobcommit.t
134

What client will it use if we fall back to fast import ? Since CL 5 touches files that are not in the current client spec, will fast import be able to update the repo to CL5?

This revision now requires changes to proceed.Dec 22 2017, 5:37 PM
dsp added inline comments.Jan 2 2018, 2:37 PM
tests/test-p4fastimport-blobcommit.t
134

Yes, using the old clientspec it will be able to update it.

dsp requested review of this revision.Jan 2 2018, 2:38 PM
dsp added inline comments.Jan 2 2018, 2:42 PM
tests/test-p4fastimport-blobcommit.t
134

In case p4fastimport uses the new client-spec, it behaves like before: if a file changes it will happily included it. So what we want to do is: use the new-spec only after p4syncimport changed. Maybe in an upcoming change we can save information about the clientspec in Mercurial to automatically detect a change in the p4fastimport case

kaleyh accepted this revision.Jan 3 2018, 4:56 PM
kaleyh added inline comments.
tests/test-p4fastimport-blobcommit.t
134

that can be a good idea

This revision is now accepted and ready to land.Jan 3 2018, 4:56 PM