diff --git a/.hgsigs b/.hgsigs --- a/.hgsigs +++ b/.hgsigs @@ -147,3 +147,5 @@ bb96d4a497432722623ae60d9bc734a1e360179e c850f0ed54c1d42f9aa079ad528f8127e5775217 0 iQIVAwUAWTQINUemf/qjRqrOAQjZDw//b4pEgHYfWRVDEmLZtevysfhlJzbSyLAnWgNnRUVdSwl4WRF1r6ds/q7N4Ege5wQHjOpRtx4jC3y/riMbrLUlaeUXzCdqKgm4JcINS1nXy3IfkeDdUKyOR9upjaVhIEzCMRpyzabdYuflh5CoxayO7GFk2iZ8c1oAl4QzuLSspn9w+znqDg0HrMDbRNijStSulNjkqutih9UqT/PYizhE1UjL0NSnpYyD1vDljsHModJc2dhSzuZ1c4VFZHkienk+CNyeLtVKg8aC+Ej/Ppwq6FlE461T/RxOEzf+WFAc9F4iJibSN2kAFB4ySJ43y+OKkvzAwc5XbUx0y6OlWn2Ph+5T54sIwqasG3DjXyVrwVtAvCrcWUmOyS0RfkKoDVepMPIhFXyrhGqUYSq25Gt6tHVtIrlcWARIGGWlsE+PSHi87qcnSjs4xUzZwVvJWz4fuM1AUG/GTpyt4w3kB85XQikIINkmSTmsM/2/ar75T6jBL3kqOCGOL3n7bVZsGXllhkkQ7e/jqPPWnNXm8scDYdT3WENNu34zZp5ZmqdTXPAIIaqGswnU04KfUSEoYtOMri3E2VvrgMkiINm9BOKpgeTsMb3dkYRw2ZY3UAH9QfdX9BZywk6v3kkE5ghLWMUoQ4sqRlTo7mJKA8+EodjmIGRV/kAv1f7pigg6pIWWEyo= 26c49ed51a698ec016d2b4c6b44ca3c3f73cc788 0 iQIcBAABCAAGBQJZXQSmAAoJELnJ3IJKpb3VmTwP/jsxFTlKzWU8EnEhEViiP2YREOD3AXU7685DIMnoyVAsZgxrt0CG6Y92b5sINCeh5B0ORPQ7+xi2Xmz6tX8EeAR+/Dpdx6K623yExf8kq91zgfMvYkatNMu6ZVfywibYZAASq02oKoX7WqSPcQG/OwgtdFiGacCrG5iMH7wRv0N9hPc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FkidueX1UnlAQa3mjh/QfKTb4/yO2Nrk7eH+QtrYxVUUYYjwgp4rS0Nd/++I1IUOor54vqJzJ7ZnM5O1RsE7VI1esAC/BTlUuO354bbm08B0owsZBwVvcVvpV4zeTvq5qyPxBJ3M0kw83Pgwh3JZB9IYhOabhSUBcA2fIPHgYGYnJVC+bLOeMWI1HJkJeoYfClNUiQUjAmi0cdTC733eQnHkDw7xyyFi+zkKu6JmU1opxkHSuj4Hrjul7Gtw3vVWWUPufz3AK7oymNp2Xr5y1HQLDtNJP3jicTTG1ae2TdX5Az3ze0I8VGbpR81/6ShAvY2cSKttV3I+2k4epxTTTf0xaZS1eUdnFOox6acElG2reNzx7EYYxpHj17K8N2qNzyY78iPgbJ+L39PBFoiGXMZJqWCxxIHoK1MxlXa8WwSnsXAU768dJvEn2N1x3fl+aeaWzeM4/5Qd83YjFuCeycuRnIo3rejSX3rWFAwZE0qQHKI5YWdKDLxIfdHTjdfMP7np+zLcHt0DV/dHmj2hKQgU0OK04fx7BrmdS1tw67Y9bL3H3TDohn7khU1FrqrKVuqSLbLsxnNyWRbZQF+DCoYrHlIW diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -160,3 +160,5 @@ bb96d4a497432722623ae60d9bc734a1e360179e c850f0ed54c1d42f9aa079ad528f8127e5775217 4.2.1 26c49ed51a698ec016d2b4c6b44ca3c3f73cc788 4.2.2 857876ebaed4e315f63157bd157d6ce553c7ab73 4.3-rc +5544af8622863796a0027566f6b646e10d522c4c 4.3 +943c91326b23954e6e1c6960d0239511f9530258 4.2.3 diff --git a/README b/README --- a/README +++ b/README @@ -4,14 +4,14 @@ Mercurial 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 --git a/contrib/chg/Makefile b/contrib/chg/Makefile --- a/contrib/chg/Makefile +++ b/contrib/chg/Makefile @@ -5,7 +5,7 @@ SRCS = chg.c hgclient.c procutil.c util. OBJS = $(SRCS:.c=.o) CFLAGS ?= -O2 -Wall -Wextra -pedantic -g -CPPFLAGS ?= -D_FORTIFY_SOURCE=2 +CPPFLAGS ?= -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE override CFLAGS += -std=gnu99 ifdef HGPATH override CPPFLAGS += -DHGPATH=\"$(HGPATH)\" diff --git a/contrib/docker/centos5 b/contrib/docker/centos5 --- a/contrib/docker/centos5 +++ b/contrib/docker/centos5 @@ -1,4 +1,7 @@ FROM centos:centos5 +RUN sed -i 's/^mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo +RUN sed -i 's/^#\(baseurl=\)http:\/\/mirror.centos.org\/centos/\1http:\/\/vault.centos.org/' /etc/yum.repos.d/*.repo +RUN sed -i 's/\$releasever/5.11/' /etc/yum.repos.d/*.repo RUN yum install -y gcc make rpm-build gettext tar RUN yum install -y python-devel python-docutils # For creating repo meta data diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -472,7 +472,7 @@ class rebaseruntime(object): commitmsg = self.collapsemsg else: commitmsg = 'Collapsed revision' - for rebased in self.state: + for rebased in sorted(self.state): if rebased not in self.skipped and\ self.state[rebased] > nullmerge: commitmsg += '\n* %s' % repo[rebased].description() diff --git a/i18n/hggettext b/i18n/hggettext --- a/i18n/hggettext +++ b/i18n/hggettext @@ -112,14 +112,20 @@ def docstrings(path): for func, rstrip in functions: if func.__doc__: + funcmod = inspect.getmodule(func) + extra = '' + if funcmod.__package__ == funcmod.__name__: + extra = '/__init__' + actualpath = '%s%s.py' % (funcmod.__name__.replace('.', '/'), extra) + src = inspect.getsource(func) - name = "%s.%s" % (path, func.__name__) + name = "%s.%s" % (actualpath, func.__name__) lineno = inspect.getsourcelines(func)[1] doc = func.__doc__ if rstrip: doc = doc.rstrip() lineno += offset(src, doc, name, 1) - print(poentry(path, lineno, doc)) + print(poentry(actualpath, lineno, doc)) def rawtext(path): diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -26,6 +26,7 @@ from . import ( changelog, copies, crecord as crecordmod, + dirstateguard, encoding, error, formatter, @@ -2889,14 +2890,23 @@ def commit(ui, repo, commitfunc, pats, o message = logmessage(ui, opts) matcher = scmutil.match(repo[None], pats, opts) + dsguard = None # extract addremove carefully -- this function can be called from a command # that doesn't support addremove - if opts.get('addremove'): - if scmutil.addremove(repo, matcher, "", opts) != 0: - raise error.Abort( - _("failed to mark all new/missing files as added/removed")) - - return commitfunc(ui, repo, message, matcher, opts) + try: + if opts.get('addremove'): + dsguard = dirstateguard.dirstateguard(repo, 'commit') + if scmutil.addremove(repo, matcher, "", opts) != 0: + raise error.Abort( + _("failed to mark all new/missing files as added/removed")) + + r = commitfunc(ui, repo, message, matcher, opts) + if dsguard: + dsguard.close() + return r + finally: + if dsguard: + dsguard.release() def samefile(f, ctx1, ctx2): if f in ctx1.manifest(): diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -828,6 +828,7 @@ def _dispatch(req): color.setup(ui_) if util.parsebool(options['pager']): + # ui.pager() expects 'internal-always-' prefix in this case ui.pager('internal-always-' + cmd) elif options['pager'] != 'auto': ui.disablepager() diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py --- a/mercurial/pycompat.py +++ b/mercurial/pycompat.py @@ -16,6 +16,7 @@ import shlex import sys ispy3 = (sys.version_info[0] >= 3) +ispypy = (r'__pypy__' in sys.builtin_module_names) if not ispy3: import cookielib diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -945,8 +945,14 @@ class ui(object): not "history, "summary" not "summ", etc. """ if (self._disablepager - or self.pageractive - or command in self.configlist('pager', 'ignore') + or self.pageractive): + # how pager should do is already determined + return + + if not command.startswith('internal-always-') and ( + # explicit --pager=on (= 'internal-always-' prefix) should + # take precedence over disabling factors below + command in self.configlist('pager', 'ignore') or not self.configbool('ui', 'paginate') or not self.configbool('pager', 'attend-' + command, True) # TODO: if we want to allow HGPLAINEXCEPT=pager, @@ -1209,6 +1215,7 @@ class ui(object): # call write() so output goes through subclassed implementation # e.g. color extension on Windows self.write(prompt, prompt=True) + self.flush() # instead of trying to emulate raw_input, swap (self.fin, # self.fout) with (sys.stdin, sys.stdout) diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -584,6 +584,14 @@ class sortdict(collections.OrderedDict): del self[key] super(sortdict, self).__setitem__(key, value) + if pycompat.ispypy: + # __setitem__() isn't called as of PyPy 5.8.0 + def update(self, src): + if isinstance(src, dict): + src = src.iteritems() + for k, v in src: + self[k] = v + @contextlib.contextmanager def acceptintervention(tr=None): """A context manager that closes the transaction on InterventionRequired diff --git a/tests/pdiff b/tests/pdiff --- a/tests/pdiff +++ b/tests/pdiff @@ -41,6 +41,9 @@ filediff(){ diff -u "$file1" "$file2" | sed "s@^--- /dev/null\(.*\)\$@--- $1\1@" | sed "s@^\+\+\+ /dev/null\(.*\)\$@+++ $2\1@" + + # in this case, files differ from each other + return 1 } if test -d "$1" -o -d "$2"; then @@ -53,6 +56,14 @@ if test -d "$1" -o -d "$2"; then while read file; do filediff "$1/$file" "$2/$file" "diff -Nru $1/$file $2/$file" done + + # TODO: there is no portable way for current while-read based + # implementation to return 1 at detecting changes. + # + # On bash and dash, assignment to variable inside while-block + # doesn't affect outside, because inside while-block is executed + # in sub-shell. BTW, it affects outside while-block on ksh (as sh + # on Solaris). else filediff "$1" "$2" fi diff --git a/tests/test-cache-abuse.t b/tests/test-cache-abuse.t --- a/tests/test-cache-abuse.t +++ b/tests/test-cache-abuse.t @@ -47,21 +47,21 @@ Make a helper function to check cache da > echo bad > $CACHE > test -z "$CLEAN" || $CLEAN > hg $CMD > after - > diff -u before after || echo "*** overwrite corruption" + > "$RUNTESTDIR/pdiff" before after || echo "*** overwrite corruption" > echo corruption >> $CACHE > test -z "$CLEAN" || $CLEAN > hg $CMD > after - > diff -u before after || echo "*** append corruption" + > "$RUNTESTDIR/pdiff" before after || echo "*** append corruption" > rm $CACHE > mkdir $CACHE > test -z "$CLEAN" || $CLEAN > hg $CMD > after - > diff -u before after || echo "*** read-only corruption" + > "$RUNTESTDIR/pdiff" before after || echo "*** read-only corruption" > test -d $CACHE || echo "*** directory clobbered" > rmdir $CACHE > test -z "$CLEAN" || $CLEAN > hg $CMD > after - > diff -u before after || echo "*** missing corruption" + > "$RUNTESTDIR/pdiff" before after || echo "*** missing corruption" > test -f $CACHE || echo "not rebuilt" > } diff --git a/tests/test-commit.t b/tests/test-commit.t --- a/tests/test-commit.t +++ b/tests/test-commit.t @@ -147,6 +147,18 @@ Using the advanced --extra flag oldhash=bar sourcehash=foo +Failed commit with --addremove should not update dirstate + + $ echo foo > newfile + $ hg status + ? newfile + $ HGEDITOR=false hg ci --addremove + adding newfile + abort: edit failed: false exited with status 1 + [255] + $ hg status + ? newfile + Make sure we do not obscure unknown requires file entries (issue2649) $ echo foo >> foo diff --git a/tests/test-extdiff.t b/tests/test-extdiff.t --- a/tests/test-extdiff.t +++ b/tests/test-extdiff.t @@ -263,8 +263,16 @@ Prepare custom diff/edit tool: will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool +#if windows + $ cat > 'diff tool.bat' << EOF + > @$PYTHON "`pwd`/diff tool.py" + > EOF + $ hg extdiff -p "`pwd`/diff tool.bat" + [1] +#else $ hg extdiff -p "`pwd`/diff tool.py" [1] +#endif Diff in working directory, after: diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -245,6 +245,7 @@ Check absolute/relative import of extens #if no-py3k $ rm "$TESTTMP"/extroot/foo.* + $ rm -Rf "$TESTTMP/extroot/__pycache__" $ cat > $TESTTMP/extroot/foo.py < # test relative import > buf = [] @@ -1238,6 +1239,7 @@ empty declaration of supported version, If the extension specifies a buglink, show that: $ echo 'buglink = "http://example.com/bts"' >> throw.py $ rm -f throw.pyc throw.pyo + $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension throw ** which supports versions unknown of Mercurial. @@ -1253,6 +1255,7 @@ If the extensions declare outdated versi $ echo "testedwith = '1.9.3'" >> older.py $ echo "testedwith = '2.1.1'" >> throw.py $ rm -f throw.pyc throw.pyo + $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ > throw 2>&1 | egrep '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension older @@ -1266,6 +1269,7 @@ If the extensions declare outdated versi One extension only tested with older, one only with newer versions: $ echo "util.version = lambda:'2.1'" >> older.py $ rm -f older.pyc older.pyo + $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ > throw 2>&1 | egrep '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension older @@ -1279,6 +1283,7 @@ One extension only tested with older, on Older extension is tested with current version, the other only with newer: $ echo "util.version = lambda:'1.9.3'" >> older.py $ rm -f older.pyc older.pyo + $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ > throw 2>&1 | egrep '^\*\*' ** Unknown exception encountered with possibly-broken third-party extension throw @@ -1305,6 +1310,7 @@ Declare the version as supporting this h > echo "unable to fetch a mercurial version. Make sure __version__ is correct"; > fi $ rm -f throw.pyc throw.pyo + $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker @@ -1316,6 +1322,7 @@ Patch version is ignored during compatib $ echo "testedwith = '3.2'" >> throw.py $ echo "util.version = lambda:'3.2.2'" >> throw.py $ rm -f throw.pyc throw.pyo + $ rm -Rf __pycache__ $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker @@ -1326,6 +1333,7 @@ Patch version is ignored during compatib Test version number support in 'hg version': $ echo '__version__ = (1, 2, 3)' >> throw.py $ rm -f throw.pyc throw.pyo + $ rm -Rf __pycache__ $ hg version -v Mercurial Distributed SCM (version *) (glob) (see https://mercurial-scm.org for more information) @@ -1350,6 +1358,7 @@ Test version number support in 'hg versi throw external 1.2.3 $ echo 'getversion = lambda: "1.twentythree"' >> throw.py $ rm -f throw.pyc throw.pyo + $ rm -Rf __pycache__ $ hg version -v --config extensions.throw=throw.py --config extensions.strip= Mercurial Distributed SCM (version *) (glob) (see https://mercurial-scm.org for more information) @@ -1674,7 +1683,7 @@ Make sure a broken uisetup doesn't globa Even though the extension fails during uisetup, hg is still basically usable: $ hg version - *** failed to set up extension baduisetup: No module named bdiff + \*\*\* failed to set up extension baduisetup: No module named (mercurial\.)?bdiff (re) Mercurial Distributed SCM (version *) (glob) (see https://mercurial-scm.org for more information) @@ -1696,8 +1705,8 @@ Even though the extension fails during u mod = _hgextimport(_origimport, head, globals, locals, None, level) File "*/hgdemandimport/demandimportpy2.py", line *, in _hgextimport (glob) return importfunc(name, globals, *args, **kwargs) - ImportError: No module named bdiff - *** failed to set up extension baduisetup: No module named bdiff + ImportError: No module named (mercurial\.)?bdiff (re) + \*\*\* failed to set up extension baduisetup: No module named (mercurial\.)?bdiff (re) Mercurial Distributed SCM (version *) (glob) (see https://mercurial-scm.org for more information) diff --git a/tests/test-flagprocessor.t b/tests/test-flagprocessor.t --- a/tests/test-flagprocessor.t +++ b/tests/test-flagprocessor.t @@ -152,6 +152,7 @@ $ hg commit -Aqm 'fail+base64+gzip+noop' abort: missing processor for flag '0x1'! [255] + $ rm fail-base64-gzip-noop # TEST: ensure we cannot register several flag processors on the same flag $ cat >> .hg/hgrc << EOF @@ -159,11 +160,11 @@ > extension=$TESTDIR/flagprocessorext.py > duplicate=$TESTDIR/flagprocessorext.py > EOF - $ echo 'this should fail' > file - $ hg commit -Aqm 'add file' + $ hg debugrebuilddirstate *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'. - abort: missing processor for flag '0x1'! - [255] + $ hg st 2>&1 | egrep 'cannot register multiple processors|flagprocessorext' + *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'. + File "*/tests/flagprocessorext.py", line *, in b64decode (glob) $ cd .. diff --git a/tests/test-pager.t b/tests/test-pager.t --- a/tests/test-pager.t +++ b/tests/test-pager.t @@ -80,6 +80,34 @@ We can control the pager from the config paged! 'summary: modify a 10\n' paged! '\n' +explicit --pager=on should take precedence over other configurations +(issue5580) + + $ cat >> $HGRCPATH < [ui] + > paginate = false + > EOF + $ hg log --limit 1 --pager=on + paged! 'changeset: 10:46106edeeb38\n' + paged! 'tag: tip\n' + paged! 'user: test\n' + paged! 'date: Thu Jan 01 00:00:00 1970 +0000\n' + paged! 'summary: modify a 10\n' + paged! '\n' + + $ cat >> $HGRCPATH < [ui] + > # true is default value of ui.paginate + > paginate = true + > EOF + $ hg log --limit 1 --pager=off + changeset: 10:46106edeeb38 + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: modify a 10 + + We can enable the pager on id: BROKEN: should be paged diff --git a/tests/test-progress.t b/tests/test-progress.t --- a/tests/test-progress.t +++ b/tests/test-progress.t @@ -312,6 +312,7 @@ of which length of byte sequence and col from each other. $ rm -f loop.pyc + $ rm -Rf __pycache__ $ cat >> loop.py < # use non-ascii characters as loop items of progress > loopitems = [ diff --git a/tests/test-revlog-raw.py b/tests/test-revlog-raw.py --- a/tests/test-revlog-raw.py +++ b/tests/test-revlog-raw.py @@ -144,12 +144,18 @@ def lowlevelcopy(rlog, tr, destname=b'_d text = None cachedelta = (deltaparent, rlog.revdiff(deltaparent, r)) flags = rlog.flags(r) - ifh = dlog.opener(dlog.indexfile, 'a+') - dfh = None - if not dlog._inline: - dfh = dlog.opener(dlog.datafile, 'a+') - dlog._addrevision(rlog.node(r), text, tr, r, p1, p2, flags, cachedelta, - ifh, dfh) + ifh = dfh = None + try: + ifh = dlog.opener(dlog.indexfile, 'a+') + if not dlog._inline: + dfh = dlog.opener(dlog.datafile, 'a+') + dlog._addrevision(rlog.node(r), text, tr, r, p1, p2, flags, + cachedelta, ifh, dfh) + finally: + if dfh is not None: + dfh.close() + if ifh is not None: + ifh.close() return dlog # Utilities to generate revisions for testing diff --git a/tests/test-username-newline.t b/tests/test-username-newline.t --- a/tests/test-username-newline.t +++ b/tests/test-username-newline.t @@ -14,10 +14,12 @@ $ rm .hg/hgrc $ HGUSER=`(echo foo; echo bar2)` hg ci -Am m + adding a abort: username 'foo\nbar2' contains a newline [255] $ hg ci -Am m -u "`(echo foo; echo bar3)`" + adding a transaction abort! rollback completed abort: username 'foo\nbar3' contains a newline!