( )⚙ D1912 p4fastimport: fix ignored executable bits

This is an archive of the discontinued Mercurial Phabricator instance.

p4fastimport: fix ignored executable bits
ClosedPublic

Authored by hollisb on Jan 18 2018, 2:26 PM.
Tags
None
Subscribers
None

Details

Reviewers
dsp
Group Reviewers
Restricted Project
Commits
rFBHGX786dd67209c8: p4fastimport: fix ignored executable bits
Summary

Previous code looked for "text+x" type from 'p4 fstat' output. This was
insufficient, because files may have types like "text+Fx" or "text+wx".

Based on the information at
https://www.perforce.com/perforce/r16.2/manuals/cmdref/file.types.html,
the executable bit is now properly handled in all cases.

The unnecessary regexp matching for the +k (keyword) file attribute is now
removed as well.

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.Jan 18 2018, 2:26 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 18 2018, 2:26 PM
hollisb added a reviewer: dsp.Jan 18 2018, 2:28 PM

When files are affected, the repo needs to be reimported. Since the commit hashes change (to include the previously omitted exec bits), all users must be informed to reclone as well...

dsp accepted this revision.Jan 20 2018, 1:20 AM

that looks good to me. Thank you for the contribution!

This revision is now accepted and ready to land.Jan 20 2018, 1:20 AM
This revision was automatically updated to reflect the committed changes.