diff --git a/remotefilelog/shallowutil.py b/remotefilelog/shallowutil.py --- a/remotefilelog/shallowutil.py +++ b/remotefilelog/shallowutil.py @@ -144,8 +144,8 @@ return metabuf _metaitemtypes = { - constants.METAKEYFLAG: int, - constants.METAKEYSIZE: int, + constants.METAKEYFLAG: (int, long), + constants.METAKEYSIZE: (int, long), } def buildpackmeta(metadict): @@ -160,7 +160,7 @@ if not isinstance(v, expectedtype): raise error.ProgrammingError('packmeta: wrong type of key %s' % k) # normalize int to binary buffer - if expectedtype is int: + if int in expectedtype: # optimization: remove flag if it's 0 to save space if k == constants.METAKEYFLAG and v == 0: continue @@ -176,7 +176,7 @@ """ metadict = _parsepackmeta(metabuf) for k, v in metadict.iteritems(): - if k in _metaitemtypes and _metaitemtypes[k] is int: + if k in _metaitemtypes and int in _metaitemtypes[k]: metadict[k] = bin2int(v) return metadict diff --git a/tests/library.sh b/tests/library.sh --- a/tests/library.sh +++ b/tests/library.sh @@ -6,6 +6,7 @@ cachepath=$CACHEDIR debug=True historypackv1=True +datapackversion=1 [extensions] remotefilelog= rebase= diff --git a/tests/test-remotefilelog-repack-fast.t b/tests/test-remotefilelog-repack-fast.t --- a/tests/test-remotefilelog-repack-fast.t +++ b/tests/test-remotefilelog-repack-fast.t @@ -3,13 +3,17 @@ $ . "$TESTDIR/library.sh" + $ cat >> $HGRCPATH < [remotefilelog] + > fastdatapack=True + > EOF + $ hginit master $ cd master $ cat >> .hg/hgrc < [remotefilelog] > server=True > serverexpiration=-1 - > fastdatapack=True > EOF $ echo x > x $ hg commit -qAm x