Durham Goode <durham@fb.com> [Thu, 05 Oct 2017 11:34:41 -0700] rev 34675
dirstate: move identity to dirstatemap
Moving the identity function to the dirstatemap class will allow alternative
dirstate implementations to replace the implementation.
Differential Revision: https://phab.mercurial-scm.org/D980
Durham Goode <durham@fb.com> [Thu, 05 Oct 2017 11:34:41 -0700] rev 34674
dirstate: move nonnormal and otherparent sets to dirstatemap
As part of separating dirstate business logic from storage, let's move the
nonnormal and otherparent storage to the dirstatemap class. This will allow
alternative dirstate storage to persist these sets instead of recomputing them.
Differential Revision: https://phab.mercurial-scm.org/D979
Durham Goode <durham@fb.com> [Thu, 05 Oct 2017 11:34:41 -0700] rev 34673
dirstate: move write into dirstatemap
As part of separating the dirstate business logic from the dirstate storage
logic, let's move the serialization code down into dirstatemap.
Differential Revision: https://phab.mercurial-scm.org/D978
Durham Goode <durham@fb.com> [Thu, 05 Oct 2017 11:34:41 -0700] rev 34672
dirstate: move _read into dirstatemap
As part of separating the dirstate business logic from the storage, let's move
the read code into the new dirstatemap class.
Differential Revision: https://phab.mercurial-scm.org/D977
Boris Feld <boris.feld@octobus.net> [Sun, 08 Oct 2017 21:29:24 +0200] rev 34671
configitems: register the 'templates' section
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 05:01:55 +0200] rev 34670
configitems: register the 'paths' config section
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 02:26:09 +0200] rev 34669
configitems: register the 'pager.attend-.*' options
Boris Feld <boris.feld@octobus.net> [Fri, 13 Oct 2017 16:39:06 +0200] rev 34668
configitems: register the 'hooks' config section
Boris Feld <boris.feld@octobus.net> [Tue, 10 Oct 2017 10:48:47 +0200] rev 34667
configitems: register the 'extensions' section
Boris Feld <boris.feld@octobus.net> [Sun, 08 Oct 2017 20:39:51 +0200] rev 34666
configitems: register the 'defaults' section
Boris Feld <boris.feld@octobus.net> [Sun, 08 Oct 2017 21:02:02 +0200] rev 34665
configitems: register the 'committemplate' section
Boris Feld <boris.feld@octobus.net> [Tue, 10 Oct 2017 10:49:28 +0200] rev 34664
configitems: register the 'color' section
Boris Feld <boris.feld@octobus.net> [Sun, 08 Oct 2017 20:26:25 +0200] rev 34663
configitems: register the 'alias' section
Boris Feld <boris.feld@octobus.net> [Tue, 10 Oct 2017 10:49:15 +0200] rev 34662
configitems: allow for the registration of "generic" config item
Some section can contains arbitrary keys (eg: color, alias, extensions). We
add a way to register some generic config items for them. This is necessary to
get all the config registered. We use a regular expression because some sub-
attributes (eg: hooks.xxx.priority) can define default value on their own.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 12 Oct 2017 09:39:50 +0200] rev 34661
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Upon pull or unbundle, we display a message with the range of new revisions
fetched. This revision range could readily be used after a pull to look out
what's new with 'hg log'. The algorithm takes care of filtering "obsolete"
revisions that might be present in transaction's "changes" but should not be
displayed to the end user.
Yuya Nishihara <yuya@tcha.org> [Fri, 13 Oct 2017 21:36:10 +0900] rev 34660
i18n: cache translated messages per encoding
This is a simpler workaround alternative to D958, "i18n: clean msgcache when
encoding changes." The cache won't be bloated unless you run tons of commands
with different --encoding options on command server, or serve many repositories
of different web.encoding options on hgweb.
The test was originally written by Jun Wu.
Differential Revision: https://phab.mercurial-scm.org/D1053
Yuya Nishihara <yuya@tcha.org> [Thu, 12 Oct 2017 22:09:11 +0900] rev 34659
templater: fix ifcontains() to handle type mismatch gracefully
This was unintentionally changed in
ee0d74083a22. Since ifcontains() takes
needle of any types, it shouldn't abort depending on the given container type.
Yuya Nishihara <yuya@tcha.org> [Thu, 12 Oct 2017 21:56:13 +0900] rev 34658
help: use single quotes in ``template example``
It was hard to read because ``""`` was rendered as """".
Yuya Nishihara <yuya@tcha.org> [Thu, 12 Oct 2017 21:48:02 +0900] rev 34657
help: hide template keywords of obsolescence as they are still experimental
Yuya Nishihara <yuya@tcha.org> [Thu, 12 Oct 2017 21:42:42 +0900] rev 34656
help: fix formatting of template keywords
Our minirst formatter can't render multi-paragraph definition lists well.
Also added periods where appropriate.
Yuya Nishihara <yuya@tcha.org> [Thu, 12 Oct 2017 22:21:14 +0900] rev 34655
chg: remove outdated rule to start test server
This rule is no longer useful because chg daemon may be killed and respawned
per config/environment hash. We can't reliably run a daemon in foreground.
Yuya Nishihara <yuya@tcha.org> [Fri, 13 Oct 2017 00:22:54 +0900] rev 34654
configitems: drop redundant default of web.allow<archtype>
Otherwise develwarn would be sent to stderr. I've added blackbox logging
to capture warnings.
Yuya Nishihara <yuya@tcha.org> [Fri, 13 Oct 2017 00:14:28 +0900] rev 34653
configitems: correct default values of web.allow<archtype> and web.hidden
The default of ui.configbool() is False unless explicitly specified.
Yuya Nishihara <yuya@tcha.org> [Fri, 13 Oct 2017 22:38:24 +0900] rev 34652
bdiff: include compat.h in header to define ssize_t
Before
ff4c9c6263de, compat.h was included first so it happened to work.
But we shouldn't rely on the include order.
Boris Feld <boris.feld@octobus.net> [Sat, 30 Sep 2017 22:37:20 +0100] rev 34651
test: add an extra case for obsolescence distributed case
This changeset introduces a new documented test case for a distributed
obsolescence scenario. The scenario involves a simple case where some
obsolescence markers are retrieved before the changeset they affect. See the
test case documentation for details.
We also test variants where the changesets are added from a bundle.
Boris Feld <boris.feld@octobus.net> [Fri, 29 Sep 2017 19:59:15 +0100] rev 34650
test: add a test file dedicated to an important distributed case
This test file introduces documented test case for obsolescence markers usage
that are important to distributed workflow cases.
In the distributed case, new changesets, markers, and phases can be added in
orders that would not happen during the local only usage. Documenting these
scenarios and test them is important as we make progress with various
obsolescence aspects.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 10 Oct 2017 23:19:35 +0530] rev 34649
repoview: remove incorrect documentation of the function
In repoview.py, computeunserved() and computemutable() functions had the same
documentation. The documentation of computemutable() is wrong. I was unable to
write documentation for the function but it's better to not having the
documentation than having it wrong.
Differential Revision: https://phab.mercurial-scm.org/D1016
Jun Wu <quark@fb.com> [Thu, 12 Oct 2017 09:34:58 -0700] rev 34648
check-code: suggest pycompat.is(posix|windows|darwin)
Differential Revision: https://phab.mercurial-scm.org/D1037
Jun Wu <quark@fb.com> [Thu, 12 Oct 2017 23:34:34 -0700] rev 34647
codemod: use pycompat.isdarwin
This is done by:
sed -i "s/pycompat\.sysplatform == 'darwin'/pycompat.isdarwin/" **/*.py
Plus a manual change to `sslutil.py` which involves indentation change that
cannot be done by `sed`.
Differential Revision: https://phab.mercurial-scm.org/D1035
Jun Wu <quark@fb.com> [Thu, 12 Oct 2017 09:04:22 -0700] rev 34646
codemod: use pycompat.isposix
This is done by:
sed -i "s/pycompat\.osname == 'posix'/pycompat.isposix/" **/*.py
Differential Revision: https://phab.mercurial-scm.org/D1036
Jun Wu <quark@fb.com> [Thu, 12 Oct 2017 23:30:46 -0700] rev 34645
codemod: use pycompat.iswindows
This is done by:
sed -i "s/pycompat\.osname == 'nt'/pycompat.iswindows/" **/*.py
sed -i "s/pycompat\.osname != 'nt'/not pycompat.iswindows/" **/*.py
sed -i 's/pycompat.osname == "nt"/pycompat.iswindows/' **/*.py
Differential Revision: https://phab.mercurial-scm.org/D1034
Jun Wu <quark@fb.com> [Thu, 12 Oct 2017 19:20:04 -0700] rev 34644
pycompat: define operating system constants
As suggested by Ryan in D1019, it's cleaner if we use defined constants
instead of `osname == 'nt'` everywhere.
Differential Revision: https://phab.mercurial-scm.org/D1033
Jun Wu <quark@fb.com> [Wed, 11 Oct 2017 21:24:32 -0700] rev 34643
hgweb: do not import uuid immediately to avoid its side effect
With hgdemandimport disabled (chg's case), `import uuid` has an immediate
side effect calling `ctypes.util.find_library` trying to locate the
`libuuid` library. This happens at `import` time before `dispatch.run()`.
The call trace is like:
File "hg/hg", line 54, in <module>
from mercurial import (
File "hg/mercurial/dispatch.py", line 24, in <module>
from . import (
File "hg/mercurial/commands.py", line 23, in <module>
from . import (
File "hg/mercurial/help.py", line 33, in <module>
from .hgweb import (
File "hg/mercurial/hgweb/__init__.py", line 20, in <module>
from . import (
File "hg/mercurial/hgweb/hgweb_mod.py", line 14, in <module>
from .common import (
File "hg/mercurial/hgweb/common.py", line 15, in <module>
import uuid
File "/usr/lib64/python2.7/uuid.py", line 404, in <module>
lib = ctypes.CDLL(ctypes.util.find_library(libname))
The problem is, `ctypes.util.find_library` will execute
`sh -c '/sbin/ldconfig -p 2>/dev/null'` on Python <= 2.7.12. The output of
`sh` may pollute the terminal:
shell-init: error retrieving current directory: getcwd: cannot access
parent directories: No such file or directory
This patch moves `import uuid` so its side-effect can only happen after the
cwd check in `dispatch._getlocal`. Therefore the terminal won't be
polluted by importing `uuid`.
Differential Revision: https://phab.mercurial-scm.org/D1024
Jun Wu <quark@fb.com> [Wed, 11 Oct 2017 17:42:57 -0700] rev 34642
check-code: forbid platform.system()
See the previous patches for the reason.
Differential Revision: https://phab.mercurial-scm.org/D1021
Jun Wu <quark@fb.com> [Wed, 11 Oct 2017 17:42:35 -0700] rev 34641
largefiles: do not use platform.system()
See the previous patch for the reason.
Differential Revision: https://phab.mercurial-scm.org/D1020
Jun Wu <quark@fb.com> [Wed, 11 Oct 2017 17:38:20 -0700] rev 34640
logtoprocess: do not use platform.system()
See the previous patch for the reason.
Differential Revision: https://phab.mercurial-scm.org/D1019
Jun Wu <quark@fb.com> [Wed, 11 Oct 2017 17:27:21 -0700] rev 34639
selectors2: do not use platform.system()
`platform.system()` may have a side effect spawning a shell executing
`uname -p`, which may print a warning when the current directory is removed:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
This patch changes selectors2 to test the `sys.platform` string, which is a
much safer way to detect Jython.
Jython's `sys.platform` looks like this:
Jython 2.7.1 (default:
0df7adb1b397, Jun 30 2017, 19:02:43)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_144
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.platform
'java1.8.0_144 ( ==linux2 for targets )'
Differential Revision: https://phab.mercurial-scm.org/D1018
Jun Wu <quark@fb.com> [Mon, 09 Oct 2017 12:42:28 -0700] rev 34638
dispatch: when --pager=no is passed, also disable pager on req.repo.ui
With a future chg change, `req.repo` could be set and currently it is
unaffected by `--pager=on`. This patch makes it so.
This could make one of the test cases in `test-pager.t` pass with future chg
changes.
Differential Revision: https://phab.mercurial-scm.org/D990
Durham Goode <durham@fb.com> [Wed, 11 Oct 2017 10:36:59 -0700] rev 34637
bundle2: immediate exit for ctrl+c (
issue5692)
21c2df59a regressed bundle2 by catching all exceptions and trying to handle
them. The old behavior was to allow KeyboardInterrupts to throw and not have
graceful cleanup, which allowed it to exit immediately. Let's go back to that
behavior.
Differential Revision: https://phab.mercurial-scm.org/D960
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 11:04:18 -0400] rev 34636
exewrapper: format with clang-format
A few *s move around, some spaces around parens, a couple of
braces. Nothing remarkable.
Differential Revision: https://phab.mercurial-scm.org/D1032
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 11:02:44 -0400] rev 34635
util: add clang-format control comment around struct and format macro
clang-format is not a fan of PyObject_HEAD.
Differential Revision: https://phab.mercurial-scm.org/D1031
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:57:23 -0400] rev 34634
mpatch: reflow two oddly formatted else blocks with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1029
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:55:51 -0400] rev 34633
mpatch: re-wrap wide line with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1027
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:51:39 -0400] rev 34632
bdiff: remove trailing newlines
Differential Revision: https://phab.mercurial-scm.org/D1009
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:51:25 -0400] rev 34631
bdiff: rewrap function prototypes per clang-format
Differential Revision: https://phab.mercurial-scm.org/D1008
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:50:54 -0400] rev 34630
bdiff: re-wrap lines per clang-format
A few too-wide lines corrected, and some places where clang-format
prefers to wrap after the binary operator instead of before. I don't
feel strongly, so I'm leaving the auto-format result as "after the
binary operator".
Differential Revision: https://phab.mercurial-scm.org/D1007
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:49:34 -0400] rev 34629
bdiff: remove extra space after * per clang-format
Differential Revision: https://phab.mercurial-scm.org/D1006
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:48:46 -0400] rev 34628
bdiff: fix misplaced comma in macro definition with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1005
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:47:51 -0400] rev 34627
bdiff: format header file with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1004
Augie Fackler <augie@google.com> [Wed, 04 Oct 2017 10:47:19 -0400] rev 34626
bdiff: sort includes using clang-format
Differential Revision: https://phab.mercurial-scm.org/D1003
muxator <a.mux@inwind.it> [Wed, 11 Oct 2017 01:47:00 +0200] rev 34625
build: "make deb" failed when the base path contained spaces
With these changes, all the commands triggered by "make deb" use proper quoting
and succeed even when invoked from a directory containing spaces.
muxator <a.mux@inwind.it> [Wed, 11 Oct 2017 02:06:12 +0200] rev 34624
build: chg build was failing when the base directory contained spaces
muxator <a.mux@inwind.it> [Wed, 11 Oct 2017 01:37:43 +0200] rev 34623
build: initial version detection by make deb/rpm was missing quoting
muxator <a.mux@inwind.it> [Wed, 11 Oct 2017 01:19:48 +0200] rev 34622
build: make install in "/doc" failed if the destination dir contained spaces
This and the following commits try to add the necessary quoting in the build
scripts to make the process more robust.
The target for now is rendering "make deb" successful even when the base
directory contains spaces (eg. "/opt/mercu rial").
The build process should succeed without scattering files in spurious
directories (eg.: "/opt/mercu/usr/bin/hg").
Paul Morelle <paul.morelle@octobus.net> [Thu, 05 Oct 2017 16:13:05 +0200] rev 34621
strip: take branch into account when selecting update target (
issue5540)
Test contributed by Matt Harbison
Keep the same behavior in most cases (i.e. first parent of the first root of
stripped changsets), but if the branch differs from wdir's, try to find another
parent of stripped commits that is on the same branch.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 04 Oct 2017 18:49:09 +0200] rev 34620
scmutil: factor out building of transaction summary callback
In registersummarycallback(), we extra generic bits of the existing
"reportsummary" function into a decorator which will be used in forthcoming
changesets to add new summary callbacks.
Denis Laxalde <denis.laxalde@logilab.fr> [Sun, 01 Oct 2017 09:52:44 +0200] rev 34619
scmutil: factor out transaction name lookup in registersummarycallback()
Add an inner txmatch function in registersummarycallback() factoring out the
logic to determine if the transaction matches a particular sources set. We'll
reuse this function to add some new report logic in the new changeset.
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 05:23:45 +0200] rev 34618
configitems: register the annotate diff options
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 05:42:56 +0200] rev 34617
configitems: register the 'convert.cvsps.logencoding' config
Boris Feld <boris.feld@octobus.net> [Wed, 11 Oct 2017 05:36:10 +0200] rev 34616
configitems: register the 'ui.interface.chunkselector' config