createPack had no option to specify the pack directory because of
which it can only create one pack in a directory. This restriction was in place
because we only test the datapack and not the datapackstore during these tests.
This commit makes the method more generic and includes the option to specify
the directory for creating the packs. This would allow for the datapackstore to
be tested while reusing most of the current logic.
Details
Details
- Reviewers
durham - Group Reviewers
Restricted Project - Commits
- rFBHGX1c2a208458c0: remotefilelog-datapack: refactor createPack method to include pack directory
Ran all the tests.
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
tests/remotefilelog-datapack.py | ||
---|---|---|
60 | The normal pattern here would be to have createPack take an optional packDir argument. If that argument is None (the default) then we use makeTempDir. That way we don't have a plethora of functions for the variations on the same action. And we don't have to update any of the existing callers. |
tests/remotefilelog-datapack.py | ||
---|---|---|
60 | I actually did that and then did this for the following reasons:
I can change it to an optional argument. |
The normal pattern here would be to have createPack take an optional packDir argument. If that argument is None (the default) then we use makeTempDir. That way we don't have a plethora of functions for the variations on the same action. And we don't have to update any of the existing callers.