Saurabh Singh <singhsrb@fb.com> [Tue, 03 Oct 2017 13:05:58 -0700] rev 34450
test-merge-subrepos: make test compatible with chg
The test checks the output of '.hg/blackbox.log' which will contain
logs corresponding to chg in case chg is running. Therefore, this commit
modifies the test to take chg into consideration while checking the
blackbox.log contents.
Test Plan:
Ran the test 'test-merge-subrepos.t' with and without the '--chg'
option.
Differential Revision: https://phab.mercurial-scm.org/D925
Saurabh Singh <singhsrb@fb.com> [Tue, 03 Oct 2017 12:49:28 -0700] rev 34449
test-convert-cvs: make test compatible with chg
The test uses the 'print' method instead of writing to stdout using
'ui.write' which leads to incompatibility with chg. This commit modifies the
test to use the 'ui' object instead which fixes the problem.
Test Plan:
Ran the test 'test-convert-cvs.t' with and without '--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D923
Saurabh Singh <singhsrb@fb.com> [Tue, 03 Oct 2017 12:09:23 -0700] rev 34448
test-basic: make test compatible with chg
The error codes returned when writing to /dev/full are different after
the first failure with and without '--chg' option. Therefore, this commit
conditionally handles the error codes as appropriate.
Test Plan:
Ran the test 'test-basic.t' with and without '--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D922
Jun Wu <quark@fb.com> [Mon, 02 Oct 2017 20:23:25 -0700] rev 34447
zeroconf: do not crash if socket being read is closed by another thread
In zeroconf/__init__.py, there is:
server = Zeroconf.Zeroconf(ip)
l = listener()
Zeroconf.ServiceBrowser(server, "_hg._tcp.local.", l)
time.sleep(1)
server.close()
`server.close()` closes the underlying socket while the `ServiceBrowser` may
still have a background thread reading the socket. There could be a race
condition where the reading thread reads the closed socket, resulting in
EBADF crash. This patch catches the exception.
This makes test-paths.t pass with chg.
Differential Revision: https://phab.mercurial-scm.org/D919
Jun Wu <quark@fb.com> [Mon, 02 Oct 2017 19:31:33 -0700] rev 34446
test-revlog-mmapindex: make it compatible with chg
The test misses an explicit flush().
Differential Revision: https://phab.mercurial-scm.org/D918
Jun Wu <quark@fb.com> [Mon, 02 Oct 2017 19:10:32 -0700] rev 34445
test-profile: gate chg-incompatible part with '#if chg'
chg has a different extension loading logic, which affects the profiler
extension test case. Gate the block with '#if chg' so the test passes with
chg.
Differential Revision: https://phab.mercurial-scm.org/D916
Jun Wu <quark@fb.com> [Mon, 02 Oct 2017 18:22:43 -0700] rev 34444
test-logtoprocess: make it compatible with chg
chg runs more commands and outputs more lines. This patch matches them.
Differential Revision: https://phab.mercurial-scm.org/D914
Saurabh Singh <singhsrb@fb.com> [Tue, 03 Oct 2017 11:10:03 -0700] rev 34443
test-globalopts: make the test compatible with chg
The test fails when run with the '--chg' option. Therefore, this
commit modifies the test to make it compatible with chg.
Test Plan:
Ran 'test-globalopts.t' with and without the '--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D913
Jun Wu <quark@fb.com> [Mon, 02 Oct 2017 16:11:57 -0700] rev 34442
test-pager: make it compatible with chg
chg's runpager implementation is different. It behaves differently for the
"shell=False, command not found" case.
Differential Revision: https://phab.mercurial-scm.org/D911
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Oct 2017 11:03:53 +0100] rev 34441
changelog: use a Factory for default value for files
The default value is compiled into the generated type. This means
that default values are shared between instances. For immutable types
like bool, str, int, and tuple, this is fine. But for mutable types
like list and dict, we need to use attr.Factory() to instantiate a
new instance of the default for each object.
Differential Revision: https://phab.mercurial-scm.org/D901
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Oct 2017 19:28:41 +0100] rev 34440
cext: wrap before brace for functions
This is our prevailing style.
Differential Revision: https://phab.mercurial-scm.org/D910
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Oct 2017 19:09:52 +0100] rev 34439
cext: put case statements on separate line
This seems to be the prevailing style, even though it is a bit more
verbose for very simple switch statements.
Differential Revision: https://phab.mercurial-scm.org/D909
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Oct 2017 19:06:00 +0100] rev 34438
cext: reorder #include
We mostly abide by this style.
In one case, a blank line was inserted to prevent a local
`#include "file"` from coming before a `#include <file>`.
Differential Revision: https://phab.mercurial-scm.org/D908
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Oct 2017 19:02:43 +0100] rev 34437
cext: move braces for control statements to same line
This seems to be the prevailing style in the code by a wide margin.
Differential Revision: https://phab.mercurial-scm.org/D907
Saurabh Singh <singhsrb@fb.com> [Mon, 02 Oct 2017 19:17:04 +0100] rev 34436
registrar: fixing typo in comment
I was just going through the module and noticed the typo. This commit
fixes 'onfalure' -> 'onfailure'.
Differential Revision: https://phab.mercurial-scm.org/D906
Alex Gaynor <agaynor@mozilla.com> [Fri, 29 Sep 2017 15:49:20 +0000] rev 34435
style: never put multiple statements on one line
Differential Revision: https://phab.mercurial-scm.org/D905
Siddharth Agarwal <sid0@fb.com> [Mon, 02 Oct 2017 18:18:57 +0100] rev 34434
annotate: mark lines affected by skip-annotate with *
This is to prevent weird surprises from happening with skips being attributed
to the wrong changeset.
.. feature::
`hg annotate --skip` now prints a `*` on lines with skipped revisions
Differential Revision: https://phab.mercurial-scm.org/D900
Siddharth Agarwal <sid0@fb.com> [Mon, 02 Oct 2017 02:34:47 -0700] rev 34433
annotate: track whether a particular annotation was the result of a skip
We're going to expose this information in the UI in an upcoming patch.
Differential Revision: https://phab.mercurial-scm.org/D899
Siddharth Agarwal <sid0@fb.com> [Mon, 02 Oct 2017 02:34:47 -0700] rev 34432
annotate: introduce attr for storing per-line annotate data
We're going to extend this a bit -- at first by simply adding whether this was
a skipped child. We're well on our way to outgrowing tuples, though -- adding
more and more fields to tuples becomes annoying very quickly.
Differential Revision: https://phab.mercurial-scm.org/D898
Siddharth Agarwal <sid0@fb.com> [Mon, 02 Oct 2017 02:34:47 -0700] rev 34431
context: rename local 'attr' to 'attr_'
In the next diff we're going to import mercurial.thirdparty.attr, and pyflakes
complains about this if this rename isn't done.
Differential Revision: https://phab.mercurial-scm.org/D897
Siddharth Agarwal <sid0@fb.com> [Mon, 02 Oct 2017 02:34:47 -0700] rev 34430
annotate: move annotatepair unit tests to a separate file
In upcoming patches the output is going to be significantly longer than it is
today, and doctests don't allow wrapping the output.
Differential Revision: https://phab.mercurial-scm.org/D896
Siddharth Agarwal <sid0@fb.com> [Mon, 02 Oct 2017 02:34:47 -0700] rev 34429
check-code: allow an exception for camelcase where required
unittest has a `maxDiff` parameter which has to be set to `None` in order for
large enough failure diffs to be displayed. Add a comment to disable the
camelcase check for `self.maxDiff = None` lines.
Differential Revision: https://phab.mercurial-scm.org/D895
Augie Fackler <augie@google.com> [Sun, 01 Oct 2017 12:16:34 -0400] rev 34428
url: use native strings for header values
Differential Revision: https://phab.mercurial-scm.org/D889
Augie Fackler <augie@google.com> [Sun, 01 Oct 2017 12:15:53 -0400] rev 34427
keepalive: python 3 portability tweaks
Differential Revision: https://phab.mercurial-scm.org/D888
Augie Fackler <augie@google.com> [Sun, 01 Oct 2017 07:29:51 -0400] rev 34426
httppasswordmgrdbproxy: specify exact arguments
We only ever call these functions in a single way, so let's just
actually specify them. We need to do some string/bytes encoding
dancing here for Python 3, so it'll help to know what arguments we
need to convert.
# no-check-commit because I'm modifying functions that check-commit
does not like.
Differential Revision: https://phab.mercurial-scm.org/D885
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Oct 2017 08:37:04 +0100] rev 34425
formatter: fix default list/dict generator to be evaluated more than once
Before, _hybrid.gen must be a generator which could be consumed only once.
It was okay in templatekw.py since template keywords are functions which
create temporary hybrid objects, but the formatter doesn't work in that way.
To work around the issue, this patch makes _hybrid.gen optionally be a
function returning a generator.
Thanks to Pulkit for finding this issue.
Yuya Nishihara <yuya@tcha.org> [Wed, 27 Sep 2017 21:38:48 +0900] rev 34424
doctest: drop hack to run py2/3 tests selectively
All doctests pass on Python 3.
muxator <a.mux@inwind.it> [Sun, 01 Oct 2017 01:02:22 +0200] rev 34423
docker: try to follow the best practices for writing Dockerfiles
Merged multiple RUN instructions and sorted the arguments alphabetically
Reference: https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
Boris Feld <boris.feld@octobus.net> [Thu, 24 Aug 2017 18:40:30 +0200] rev 34422
effectflag: document effect flag
Differential Revision: https://phab.mercurial-scm.org/D542
Boris Feld <boris.feld@octobus.net> [Thu, 06 Jul 2017 15:00:07 +0200] rev 34421
effectflag: detect when diff changed
Store in effect flag when the diff changed between the predecessor and
its successors.
Comparing the diff is not easy because we do not want to incorrectly detect a
Boris Feld <boris.feld@octobus.net> [Thu, 06 Jul 2017 14:58:44 +0200] rev 34420
effectflag: detect when meta changed
Store in effect flag when the meta changed between the predecessor and its
successors. We blacklisted some known meta that would always changed when
another flag change. For example rebase would always add a meta rebase-source
while the effect flag parents will already detect this situation.
It can happens with various hg commands.
Differential Revision: https://phab.mercurial-scm.org/D540
Boris Feld <boris.feld@octobus.net> [Thu, 06 Jul 2017 14:56:16 +0200] rev 34419
effectflag: detect when parents changed
Store in effect flag when the parents changed between the predecessor and
its successors.
It can happens with "hg rebase" or "hg grab".
Differential Revision: https://phab.mercurial-scm.org/D539