# HG changeset patch # User Augie Fackler # Date 1498246227 14400 # Node ID c808862f2e6efc17c690676263605a3d7968a028 # Parent f63d111258dab8375322483888a44bf9be6c4673# Parent 4e7352b8325c7266d6dbcbc81bfcfba13b95ed27 merge with stable diff -r 4e7352b8325c -r c808862f2e6e .hgignore --- a/.hgignore Fri Jun 23 13:22:04 2017 +0200 +++ b/.hgignore Fri Jun 23 15:30:27 2017 -0400 @@ -54,14 +54,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 4e7352b8325c -r c808862f2e6e Makefile --- a/Makefile Fri Jun 23 13:22:04 2017 +0200 +++ b/Makefile Fri Jun 23 15:30:27 2017 -0400 @@ -64,7 +64,6 @@ -$(PYTHON) setup.py clean --all # ignore errors from this command find contrib doc hgext hgext3rd i18n mercurial tests \ \( -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,6 +176,14 @@ # 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) && \ OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \ diff -r 4e7352b8325c -r c808862f2e6e contrib/bdiff-torture.py --- a/contrib/bdiff-torture.py Fri Jun 23 13:22:04 2017 +0200 +++ b/contrib/bdiff-torture.py Fri Jun 23 15:30:27 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 4e7352b8325c -r c808862f2e6e contrib/check-code.py --- a/contrib/check-code.py Fri Jun 23 13:22:04 2017 +0200 +++ b/contrib/check-code.py Fri Jun 23 15:30:27 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'python\s.+\.py', "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 [ @@ -299,7 +302,8 @@ (r'^\s*(while|if) [01]:', "use True/False for constant Boolean expression"), (r'(?:(?|int|bool|list)\( + # First argument. + ['"](?P
\S+)['"],\s* + # Second argument + ['"](?P