This is an archive of the discontinued Mercurial Phabricator instance.

datapack: allow 'long' for metadata types
ClosedPublic

Authored by durham on Jul 11 2017, 7:20 PM.
Tags
None
Subscribers
None

Details

Reviewers
quark
phillco
Group Reviewers
Restricted Project
Commits
rFBHGXb176b79b1c1d: datapack: allow 'long' for metadata types
Summary

Previously the code required that sizes be of type int. Since python plays loose
with integer types, we also need to support long.

Test Plan

The existing test-remotefilelog-repack-fast.t test was completely
broken. It only enabled fast datapacks for the server repo, not the clients.
Enabling it for the clients as well catches this issue and verifies the fix.

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

durham created this revision.Jul 11 2017, 7:20 PM
quark accepted this revision.Jul 11 2017, 7:28 PM

Thanks for fixing this!

remotefilelog/shallowutil.py
159

Ah, TIL isinstance accepts a tuple.

tests/test-remotefilelog-repack-fast.t
6–10

This could be probably unified with the non-fast version by using #testcases

This revision is now accepted and ready to land.Jul 11 2017, 7:28 PM
phillco accepted this revision.Jul 11 2017, 7:30 PM
This revision was automatically updated to reflect the committed changes.