Commit Graph

5 Commits

Author SHA1 Message Date
David Soria Parra
dde1b0d2d2 p4fastimport: decode special perforce characters in filenames
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
2017-08-10 15:49:15 -07:00
Zhihui Huang
784c334b8e p4fastimport: handle race condition in git fusion commits
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
2017-07-31 11:06:31 -07:00
Yan Yan
8e95eaafb0 Let non-existing client fail the import early
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
2017-07-13 10:18:39 -07:00
Zhihui Huang
5e0994a87f p4fastimport: handle keyword extension
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
2017-06-19 11:54:10 -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