##// END OF EJS Templates
copies: fix the changeset based algorithm regarding merge...
copies: fix the changeset based algorithm regarding merge In 99ebde4fec99, we changed the list of files stored into the `files` field. This lead to the changeset centric copy algorithm to break in various merge situation involving merge. Older information could reach the merge through `p1`, and while information from `p2` was strictly fresher, it would get overwritten anyway. We update the situation with more details about which revision introduces rename information. This help use making the right decision in case of merge. We are now running a more comprehensive suite of test with include this kind of situation. The behavior differ slightly from the filelog based in a couple of instance. There is mostly two distinct cases: 1) there are conflicting rename information in a merge (different rename history on each side). In this case the filelog based implementation arbitrarily pick a side based on the file-revision-number. So it depends on a local factor. The changeset centric algorithm will use a deterministic approach, by picking the information coming from the first parent of the merge. This is stable across different clone. 2) rename information related to file that exist in both source and destination. The filelog based implementation do not even try to detect these, however the changeset centric one get them for "free" (it is simpler to detect them than not). The new implementation focus on correctness. Performance improvement will come later. Differential Revision: https://phab.mercurial-scm.org/D8244

File last commit:

r45129:bc847878 default
r45252:45f3f35c default
Show More
pyoxidizer.bzl
59 lines | 1.7 KiB | text/x-python | PythonLexer
ROOT = CWD + "/../.."
def make_exe():
dist = default_python_distribution()
code = "import hgdemandimport; hgdemandimport.enable(); from mercurial import dispatch; dispatch.run()"
config = PythonInterpreterConfig(
raw_allocator = "system",
run_eval = code,
# We want to let the user load extensions from the file system
filesystem_importer = True,
# We need this to make resourceutil happy, since it looks for sys.frozen.
sys_frozen = True,
legacy_windows_stdio = True,
)
exe = dist.to_python_executable(
name = "hg",
resources_policy = "prefer-in-memory-fallback-filesystem-relative:lib",
config = config,
# Extension may depend on any Python functionality. Include all
# extensions.
extension_module_filter = "all",
)
exe.add_python_resources(dist.pip_install([ROOT]))
return exe
def make_install(exe):
m = FileManifest()
# `hg` goes in root directory.
m.add_python_resource(".", exe)
templates = glob(
include = [ROOT + "/mercurial/templates/**/*"],
strip_prefix = ROOT + "/mercurial/",
)
m.add_manifest(templates)
return m
def make_embedded_resources(exe):
return exe.to_embedded_resources()
register_target("exe", make_exe)
register_target("app", make_install, depends = ["exe"], default = True)
register_target("embedded", make_embedded_resources, depends = ["exe"], default_build_script = True)
resolve_targets()
# END OF COMMON USER-ADJUSTED SETTINGS.
#
# Everything below this is typically managed by PyOxidizer and doesn't need
# to be updated by people.
PYOXIDIZER_VERSION = "0.7.0-pre"
PYOXIDIZER_COMMIT = "c772a1379c3026314eda1c8ea244b86c0658951d"