Summary:
Perforce encodes certain characters in filenames (see
https://www.perforce.com/perforce/doc.current/manuals/cmdref/filespecs.html)
We must decode this before we add it to Mercurial.
Test Plan:
python ../../hg-crew/test/run-tests.py test-check* test-p4fastimport*
Reviewers: #idi, #mercurial, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, steaphan, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5570533
Tasks: 20133877
Signature: t1:5570533:1502010300:0ef3ce0c228c61e23396b5a8ac887ac8c65812ff
Summary:
When a user commits changes to a git-fusion repo, it pushes commit to perforce as user git-fusion-user, and then update the commit's author to be the actual author. We want p4fastimporter to skip the git-fusion-user commit and import the commit by the actual author. This diff sets the basic workflow, where we specify the constraint to be commits by git-fusion-user that is less than 30 seconds old.
// TODO: make the constraint configurable.
Test Plan:
$ cd ~/facebook-hg-rpms/fb-hgext/tests/
// test race condition
$ python ../../hg-crew/tests/run-tests.py test-p4fastimport-gitfusion-race-condition.t
// test all
$ python ../../hg-crew/tests/run-tests.py test-p4*
Reviewers: #idi, davidsp
Reviewed By: davidsp
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5509536
Tasks: 20141882
Signature: t1:5509536:1501521842:17dd767615b8218980eda68d4113433d30805d92
Summary: Check if the client exists, and if not, exit the import. Added a test for non-regression.
Test Plan: running test-p4fastimport-import-badclient.t
Reviewers: davidsp
Reviewed By: davidsp
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5405340
Signature: t1:5405340:1499965824:394077f0d148be2e5fef15902c69703eaf360bbb
Summary:
Perforce has a feature called [[ http://answers.perforce.com/articles/KB/3482 | keyword expansion ]].
When a file is marked +k or +ko and you have a string like $Id$, it get's expanded to $Id: SOMETHING$ on Perforce. When importing a file like this from Perforce into Mercurial we need to do the reverse, renaming $Id: SOMETHING$ to $Id$ (and equivalent for all other expansion types).
Test Plan:
$ cd ~/facebook-hg-rpms/fb-hgext/tests/
$ python ../../hg-crew/tests/run-tests.py test-p4fastimport-import.t
$ python ../../hg-crew/tests/run-tests.py test-p4*
Reviewers: #idi, davidsp
Reviewed By: davidsp
Subscribers: davidsp
Differential Revision: https://phabricator.intern.facebook.com/D5266323
Tasks: 19211063
Signature: t1:5266323:1497890444:a1cced5faa5e48c708c2721510952ca4d27d1bd4
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