##// END OF EJS Templates
exchange: support for streaming clone bundles...
exchange: support for streaming clone bundles Now that we have a mechanism to produce and consume streaming clone bundles, we need to teach the human-facing bundle specification parser and the internal bundle file header reading code to be aware of this new format. This patch does so. For the human-facing bundle specification, we choose the name "packed" to describe "streaming clone bundles" because the bundle is essentially a "pack" of raw revlog files that are "packed" together. There should probably be a bikeshed over the name, especially since it is human facing.

File last commit:

r25756:a4a41525 default
r26756:9e272a96 default
Show More
fakepatchtime.py
26 lines | 942 B | text/x-python | PythonLexer
# extension to emulate invoking 'patch.internalpatch()' at the time
# specified by '[fakepatchtime] fakenow'
from mercurial import extensions, patch as patchmod, util
def internalpatch(orig, ui, repo, patchobj, strip,
prefix='', files=None,
eolmode='strict', similarity=0):
if files is None:
files = set()
r = orig(ui, repo, patchobj, strip,
prefix=prefix, files=files,
eolmode=eolmode, similarity=similarity)
fakenow = ui.config('fakepatchtime', 'fakenow')
if fakenow:
# parsing 'fakenow' in YYYYmmddHHMM format makes comparison between
# 'fakenow' value and 'touch -t YYYYmmddHHMM' argument easy
fakenow = util.parsedate(fakenow, ['%Y%m%d%H%M'])[0]
for f in files:
repo.wvfs.utime(f, (fakenow, fakenow))
return r
def extsetup(ui):
extensions.wrapfunction(patchmod, 'internalpatch', internalpatch)