Page MenuHomePhabricator

p4fastimport: work around P4 symlink/directory bug
ClosedPublic

Authored by hollisb on Nov 3 2017, 7:14 PM.

Details

Reviewers
dsp
Group Reviewers
Restricted Project
Commits
rFBHGX64c01d4af1cd: p4fastimport: work around P4 symlink/directory bug
Summary

The P4 repository can erroneously consider a file to be "inside" a symlink to a
directory. 'p4 sync' (the client) reports an error if it encounters this
situation, but 'hg update' aborts.

Work around the problem by discarding such files. In the testcase, we can't
accept changelist #2, because we have no changelist that deletes the symlink,
so instead we have to ignore the new file.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

hollisb created this revision.Nov 3 2017, 7:14 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 3 2017, 7:14 PM
hollisb added a reviewer: dsp.Nov 3 2017, 7:16 PM
dsp added inline comments.Nov 21 2017, 3:55 PM
tests/test-p4fastimport-import-badsymlink.t
26

what happens if we mkdir Main/d/d and then generate Main/d/d/d, does Main/d still show up as a symlink?

hollisb updated this revision to Diff 3885.Nov 27 2017, 2:46 PM
hollisb marked an inline comment as done.Nov 27 2017, 2:48 PM

Patch revised to address comment.

hollisb edited the summary of this revision. (Show Details)Dec 12 2017, 6:54 PM
hollisb retitled this revision from p4fastimport: work around p4 symlink/directory bug to p4fastimport: work around P4 symlink/directory bug.
hollisb updated this revision to Diff 4401.
dsp accepted this revision.Dec 22 2017, 4:51 PM

looks good. Thank you!

This revision is now accepted and ready to land.Dec 22 2017, 4:51 PM
This revision was automatically updated to reflect the committed changes.