##// END OF EJS Templates
fix: add a -s option to format a revision and its descendants...
fix: add a -s option to format a revision and its descendants `hg fix -r abc123` will format that commit but not its descendants. That seems expected given the option name (`-r`), but it's very rarely what the user wants to do. The problem is that any descendants of that commit will not be formatted, leaving them as orphans that are hard to evolve. They are hard to evolve because the new parent will have formatting changes that the orphan doesn't have. I talked to Danny Hooper (who wrote most of the fix extension) about the problem and we agreed that deprecating `-r` in favor of a new `-s` argument (mimicing rebase's `-s`) would be a good way of reducing the risk that users end up with these hard-to-evolve orphans. So that's what this patch implements. Differential Revision: https://phab.mercurial-scm.org/D8287

File last commit:

r44868:6689ceba default
r45064:5205b46b default
Show More
pyoxidizer.bzl
60 lines | 1.6 KiB | text/x-python | PythonLexer
# Instructions:
#
# 1. cargo install --version 0.5.0 pyoxidizer
# 2. cd /path/to/hg
# 3. pyoxidizer build --path contrib/packaging [--release]
# 4. Run build/pyoxidizer/<arch>/<debug|release>/app/hg
#
# If you need to build again, you need to remove the build/lib.* and
# build/temp.* directories, otherwise PyOxidizer fails to pick up C
# extensions. This is a bug in PyOxidizer.
ROOT = CWD + "/../.."
set_build_path(ROOT + "/build/pyoxidizer")
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",
config = config,
)
# Use setup.py install to build Mercurial and collect Python resources to
# embed in the executable.
resources = dist.setup_py_install(ROOT)
exe.add_python_resources(resources)
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
register_target("exe", make_exe)
register_target("app", make_install, depends = ["exe"], default = True)
resolve_targets()