##// END OF EJS Templates
patch: use temporary files to handle intermediate copies...
patch: use temporary files to handle intermediate copies git patches may require copies to be handled out-of-order. For instance, take the following sequence: * modify a * copy a into b Here, we have to generate b from a before its modification. To do so, applydiff() was scanning for copy metadata and performing the copies before processing the other changes in-order. While smart and efficient, this approach complicates things by handling file copies and file creations at different places and times. While a new file must not exist before being patched a copied file already exists before applying the first hunk. Instead of copying the files at their final destination before patching, we store them in a temporary file location and retrieve them when patching. The filestore always stores file content in real files but nothing prevents adding a cache layer. The filestore class was kept separate from fsbackend for at least two reasons: - This class is likely to be reused as a temporary result store for a future repository patching call (entries just have to be extended to contain copy sources). - Delegating this role to backends might be more efficient in a repository backend case: the source files are already available in the repository itself and do not need to be copied again. It also means that third-parties backend would have to implement two other methods. If we ever decide to merge the filestore feature into backend, a minimalistic approach would be to compose with filestore directly. Keep in mind this copy overhead only applies for copy/rename sources, and may even be reduced to copy sources which have to handled ahead of time.
Patrick Mezard -
r14452:ee574cfd default
Show More
Name Size Modified Last Commit Author
/ mercurial
help
hgweb
httpclient
pure
templates
__init__.py Loading ...
ancestor.py Loading ...
archival.py Loading ...
base85.c Loading ...
bdiff.c Loading ...
bookmarks.py Loading ...
bundlerepo.py Loading ...
byterange.py Loading ...
changegroup.py Loading ...
changelog.py Loading ...
cmdutil.py Loading ...
commands.py Loading ...
config.py Loading ...
context.py Loading ...
copies.py Loading ...
dagparser.py Loading ...
dagutil.py Loading ...
demandimport.py Loading ...
diffhelpers.c Loading ...
dirstate.py Loading ...
discovery.py Loading ...
dispatch.py Loading ...
encoding.py Loading ...
error.py Loading ...
extensions.py Loading ...
fancyopts.py Loading ...
filelog.py Loading ...
filemerge.py Loading ...
graphmod.py Loading ...
hbisect.py Loading ...
help.py Loading ...
hg.py Loading ...
hook.py Loading ...
httpconnection.py Loading ...
httprepo.py Loading ...
i18n.py Loading ...
ignore.py Loading ...
keepalive.py Loading ...
localrepo.py Loading ...
lock.py Loading ...
lsprof.py Loading ...
lsprofcalltree.py Loading ...
mail.py Loading ...
manifest.py Loading ...
match.py Loading ...
mdiff.py Loading ...
merge.py Loading ...
minirst.py Loading ...
mpatch.c Loading ...
node.py Loading ...
osutil.c Loading ...
parser.py Loading ...
parsers.c Loading ...
patch.py Loading ...
posix.py Loading ...
pushkey.py Loading ...
py3kcompat.py Loading ...
repair.py Loading ...
repo.py Loading ...
revlog.py Loading ...
revset.py Loading ...
scmutil.py Loading ...
setdiscovery.py Loading ...
similar.py Loading ...
simplemerge.py Loading ...
sshrepo.py Loading ...
sshserver.py Loading ...
sslutil.py Loading ...
statichttprepo.py Loading ...
store.py Loading ...
strutil.py Loading ...
subrepo.py Loading ...
tags.py Loading ...
templatefilters.py Loading ...
templatekw.py Loading ...
templater.py Loading ...
transaction.py Loading ...
treediscovery.py Loading ...
ui.py Loading ...
url.py Loading ...
util.h Loading ...
util.py Loading ...
verify.py Loading ...
win32.py Loading ...
windows.py Loading ...
wireproto.py Loading ...