##// END OF EJS Templates
copies: handle a case when both merging csets are not descendant of merge base...
copies: handle a case when both merging csets are not descendant of merge base This patch fix the behaviour of fullcopytracing algorithm in the case when both the merging csets are not the descendant of merge base. Although it seems to be the rare case when both the csets are not descendant of merge base. But it can be seen in most of cases of content-divergence in evolve extension, where merge base is the common predecessor. Previous patch added a test where this algorithm can fail to continue because of an assumption that only one of the two csets can be dirty. This patch fix that error. For refrence I suggest you to look into the previous discussion held on a patch sent by Pulkit: https://phab.mercurial-scm.org/D3896 Differential Revision: https://phab.mercurial-scm.org/D5963

File last commit:

r42087:4371f543 default
r42098:7694b685 default
Show More
build.py
65 lines | 2.1 KiB | text/x-python | PythonLexer
#!/usr/bin/env python3
# Copyright 2019 Gregory Szorc <gregory.szorc@gmail.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
# no-check-code because Python 3 native.
"""Code to build Mercurial WiX installer."""
import argparse
import os
import pathlib
import sys
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--name',
help='Application name',
default='Mercurial')
parser.add_argument('--python',
help='Path to Python executable to use',
required=True)
parser.add_argument('--sign-sn',
help='Subject name (or fragment thereof) of certificate '
'to use for signing')
parser.add_argument('--sign-cert',
help='Path to certificate to use for signing')
parser.add_argument('--sign-password',
help='Password for signing certificate')
parser.add_argument('--sign-timestamp-url',
help='URL of timestamp server to use for signing')
parser.add_argument('--version',
help='Version string to use')
args = parser.parse_args()
here = pathlib.Path(os.path.abspath(os.path.dirname(__file__)))
source_dir = here.parent.parent.parent
sys.path.insert(0, str(source_dir / 'contrib' / 'packaging'))
from hgpackaging.wix import (
build_installer,
build_signed_installer,
)
fn = build_installer
kwargs = {
'source_dir': source_dir,
'python_exe': pathlib.Path(args.python),
'version': args.version,
}
if args.sign_sn or args.sign_cert:
fn = build_signed_installer
kwargs['name'] = args.name
kwargs['subject_name'] = args.sign_sn
kwargs['cert_path'] = args.sign_cert
kwargs['cert_password'] = args.sign_password
kwargs['timestamp_url'] = args.sign_timestamp_url
fn(**kwargs)