# HG changeset patch # User Augie Fackler # Date 1502389405 14400 # Node ID 98e990bb733008e2f7589bb7b276c16dd3aad5e4 # Parent 460121715f4a5d8331b1c62530bafcee8de755e4# Parent 506d7e48fbe68d6925a2cbfcafa9baded5f7de14 stable: merge heads diff -r 506d7e48fbe6 -r 98e990bb7330 .arcconfig --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.arcconfig Thu Aug 10 14:23:25 2017 -0400 @@ -0,0 +1,6 @@ +{ + "conduit_uri": "https://phab.mercurial-scm.org/api", + "repository.callsign": "HG", + "arc.land.onto.default": "@", + "base": "hg:.^" +} diff -r 506d7e48fbe6 -r 98e990bb7330 .hgignore --- a/.hgignore Thu Aug 10 14:14:49 2017 -0400 +++ b/.hgignore Thu Aug 10 14:23:25 2017 -0400 @@ -55,14 +55,6 @@ locale/*/LC_MESSAGES/hg.mo hgext/__index__.py -# files installed with a local --pure build -mercurial/base85.py -mercurial/bdiff.py -mercurial/diffhelpers.py -mercurial/mpatch.py -mercurial/osutil.py -mercurial/parsers.py - # Generated wheels wheelhouse/ diff -r 506d7e48fbe6 -r 98e990bb7330 .hgsigs --- a/.hgsigs Thu Aug 10 14:14:49 2017 -0400 +++ b/.hgsigs Thu Aug 10 14:23:25 2017 -0400 @@ -145,4 +145,7 @@ 616e788321cc4ae9975b7f0c54c849f36d82182b 0 iQIVAwUAWPZuQkemf/qjRqrOAQjFlg/9HXEegJMv8FP+uILPoaiA2UCiqWUL2MVJ0K1cvafkwUq+Iwir8sTe4VJ1v6V+ZRiOuzs4HMnoGJrIks4vHRbAxJ3J6xCfvrsbHdl59grv54vuoL5FlZvkdIe8L7/ovKrUmNwPWZX2v+ffFPrsEBeVlVrXpp4wOPhDxCKTmjYVOp87YqXfJsud7EQFPqpV4jX8DEDtJWT95OE9x0srBg0HpSE95d/BM4TuXTVNI8fV41YEqearKeFIhLxu37HxUmGmkAALCi8RJmm4hVpUHgk3tAVzImI8DglUqnC6VEfaYb+PKzIqHelhb66JO/48qN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jwgp4rS0Nd/++I1IUOor54vqJzJ7ZnM5O1RsE7VI1esAC/BTlUuO354bbm08B0owsZBwVvcVvpV4zeTvq5qyPxBJ3M0kw83Pgwh3JZB9IYhOabhSUBcA2fIPHgYGYnJVC+bLOeMWI1HJkJeoYfClNUiQUjAmi0cdTC733eQnHkDw7xyyFi+zkKu6JmU1opxkHSuj4Hrjul7Gtw3vVWWUPufz3AK7oymNp2Xr5y1HQLDtNJP3jicTTG1ae2TdX5Az3ze0I8VGbpR81/6ShAvY2cSKttV3I+2k4epxTTTf0xaZS1eUdnFOox6acElG2reNzx7EYYxpHj17K8N2qNzyY78iPgbJ+L39PBFoiGXMZJqWCxxIHoK1MxlXa8WwSnsXAU768dJvEn2N1x3fl+aeaWzeM4/5Qd83YjFuCeycuRnIo3rejSX3rWFAwZE0qQHKI5YWdKDLxIfdHTjdfMP7np+zLcHt0DV/dHmj2hKQgU0OK04fx7BrmdS1tw67Y9bL3H3TDohn7khU1FrqrKVuqSLbLsxnNyWRbZQF+DCoYrHlIW diff -r 506d7e48fbe6 -r 98e990bb7330 .hgtags --- a/.hgtags Thu Aug 10 14:14:49 2017 -0400 +++ b/.hgtags Thu Aug 10 14:23:25 2017 -0400 @@ -158,4 +158,7 @@ 616e788321cc4ae9975b7f0c54c849f36d82182b 4.2-rc bb96d4a497432722623ae60d9bc734a1e360179e 4.2 c850f0ed54c1d42f9aa079ad528f8127e5775217 4.2.1 +26c49ed51a698ec016d2b4c6b44ca3c3f73cc788 4.2.2 +857876ebaed4e315f63157bd157d6ce553c7ab73 4.3-rc +5544af8622863796a0027566f6b646e10d522c4c 4.3 943c91326b23954e6e1c6960d0239511f9530258 4.2.3 diff -r 506d7e48fbe6 -r 98e990bb7330 Makefile --- a/Makefile Thu Aug 10 14:14:49 2017 -0400 +++ b/Makefile Thu Aug 10 14:23:25 2017 -0400 @@ -14,6 +14,7 @@ export LANGUAGE=C export LC_ALL=C TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) +OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS) # Set this to e.g. "mingw32" to use a non-default compiler. COMPILER= @@ -62,9 +63,8 @@ cleanbutpackages: -$(PYTHON) setup.py clean --all # ignore errors from this command - find contrib doc hgext hgext3rd i18n mercurial tests \ + find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \ \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';' - rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/[a-z]*.py))) rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err rm -f mercurial/__modulepolicy__.py if test -d .hg; then rm -f mercurial/__version__.py; fi @@ -177,8 +177,16 @@ # location of our own. install -d build/mercurial/usr/local/hg/contrib/ install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash + make -C contrib/chg \ + HGPATH=/usr/local/bin/hg \ + PYTHON=/usr/bin/python2.7 \ + HG=/usr/local/bin/hg \ + HGEXTDIR=/Library/Python/2.7/site-packages/hgext \ + DESTDIR=../../build/mercurial \ + PREFIX=/usr/local \ + clean install mkdir -p $${OUTPUTDIR:-dist} - HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \ + HGVER=$(shell python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py ) && \ OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \ pkgbuild --filter \\.DS_Store --root build/mercurial/ \ --identifier org.mercurial-scm.mercurial \ @@ -268,13 +276,13 @@ centos6: mkdir -p packages/centos6 - contrib/buildrpm + contrib/buildrpm --withpython cp rpmbuild/RPMS/*/* packages/centos6 cp rpmbuild/SRPMS/* packages/centos6 docker-centos6: mkdir -p packages/centos6 - contrib/dockerrpm centos6 + contrib/dockerrpm centos6 --withpython centos7: mkdir -p packages/centos7 diff -r 506d7e48fbe6 -r 98e990bb7330 README --- a/README Thu Aug 10 14:14:49 2017 -0400 +++ b/README Thu Aug 10 14:23:25 2017 -0400 @@ -4,14 +4,14 @@ Mercurial is a fast, easy to use, distributed revision control tool for software developers. -Basic install: +Basic install:: $ make # see install targets $ make install # do a system-wide install $ hg debuginstall # sanity-check setup $ hg # see help -Running without installing: +Running without installing:: $ make local # build for inplace usage $ ./hg --version # should show the latest version diff -r 506d7e48fbe6 -r 98e990bb7330 contrib/bdiff-torture.py --- a/contrib/bdiff-torture.py Thu Aug 10 14:14:49 2017 -0400 +++ b/contrib/bdiff-torture.py Thu Aug 10 14:23:25 2017 -0400 @@ -5,8 +5,7 @@ import sys from mercurial import ( - bdiff, - mpatch, + mdiff, ) def reducetest(a, b): @@ -42,10 +41,10 @@ sys.exit(0) def test1(a, b): - d = bdiff.bdiff(a, b) + d = mdiff.textdiff(a, b) if not d: raise ValueError("empty") - c = mpatch.patches(a, [d]) + c = mdiff.patches(a, [d]) if c != b: raise ValueError("bad") diff -r 506d7e48fbe6 -r 98e990bb7330 contrib/build-linux-wheels.sh --- a/contrib/build-linux-wheels.sh Thu Aug 10 14:14:49 2017 -0400 +++ b/contrib/build-linux-wheels.sh Thu Aug 10 14:23:25 2017 -0400 @@ -3,7 +3,7 @@ # https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh set -e -x -PYTHON_TARGETS=$(ls -d /opt/python/cp2*/bin) +PYTHON_TARGETS=$(ls -d /opt/python/cp27*/bin) # Create an user for the tests useradd hgbuilder diff -r 506d7e48fbe6 -r 98e990bb7330 contrib/check-code.py --- a/contrib/check-code.py Thu Aug 10 14:14:49 2017 -0400 +++ b/contrib/check-code.py Thu Aug 10 14:23:25 2017 -0400 @@ -116,6 +116,7 @@ (r'printf.*[^\\]\\x', "don't use printf \\x, use Python"), (r'\$\(.*\)', "don't use $(expr), use `expr`"), (r'rm -rf \*', "don't use naked rm -rf, target a directory"), + (r'\[[^\]]+==', '[ foo == bar ] is a bashism, use [ foo = bar ] instead'), (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w', "use egrep for extended grep syntax"), (r'/bin/', "don't use explicit paths for tools"), @@ -137,6 +138,7 @@ "put a backslash-escaped newline after sed 'i' command"), (r'^diff *-\w*[uU].*$\n(^ \$ |^$)', "prefix diff -u/-U with cmp"), (r'^\s+(if)? diff *-\w*[uU]', "prefix diff -u/-U with cmp"), + (r'[\s="`\']python\s(?!bindings)', "don't use 'python', use '$PYTHON'"), (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"), (r'\butil\.Abort\b', "directly use error.Abort"), (r'\|&', "don't use |&, use 2>&1"), @@ -144,6 +146,7 @@ (r'\bsed\b.*[^\\]\\n', "don't use 'sed ... \\n', use a \\ and a newline"), (r'env.*-u', "don't use 'env -u VAR', use 'unset VAR'"), (r'cp.* -r ', "don't use 'cp -r', use 'cp -R'"), + (r'grep.* -[ABC] ', "don't use grep's context flags"), ], # warnings [ @@ -298,8 +301,10 @@ "comparison with singleton, use 'is' or 'is not' instead"), (r'^\s*(while|if) [01]:', "use True/False for constant Boolean expression"), + (r'^\s*if False(:| +and)', 'Remove code instead of using `if False`'), (r'(?:(?|int|bool|list)\( + # First argument. + ['"](?P
\S+)['"],\s* + # Second argument + ['"](?P