When a file changed to include a flag and then the flag is removed we did not
correctly remove the flag. We now correctly set flags for all revisions.
Details
Details
- Reviewers
durham quark - Commits
- rFBHGXfad65366d820: p4fastimport: fix resetting file flags
python run-tests.py test-p4fastimport-import-modes.t
Diff Detail
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
Comment Actions
Previously, flags were only stored in fileinfo when a file had some (either x or l). This patch now stores flags for all files; they're just almost always empty. In an import of 48K files, that's a lot of memory storage for nothing. There's also runtime overhead, because now we're always calling mf.setflag().
Alternative:
Instead of changing how we create fileinfo, change how we consume fileinfo. Call mf.setflags() only if mf.flags() != info['flags']. Missing flags are implicitly empty flags.
Less memory consumption, and I would hope faster too.