Rodrigo Damazio Bovendorp <rdamazio@google.com> [Mon, 13 Feb 2017 17:03:14 -0800] rev 31013
match: making visitdir() deal with non-recursive entries
Primarily as an optimization to avoid recursing into directories that will
never have a match inside, this classifies each matcher pattern's root as
recursive or non-recursive (erring on the side of keeping it recursive,
which may lead to wasteful directory or manifest walks that yield no matches).
I measured the performance of "rootfilesin" in two repos:
- The Firefox repo with tree manifests, with
"hg files -r . -I rootfilesin:browser".
The browser directory contains about 3K files across 249 subdirectories.
- A specific Google-internal directory which contains 75K files across 19K
subdirectories, with "hg files -r . -I rootfilesin:REDACTED".
I tested with both cold and warm disk caches. Cold cache was produced by
running "sync; echo 3 > /proc/sys/vm/drop_caches". Warm cache was produced
by re-running the same command a few times.
These were the results:
Cold cache Warm cache
Before After Before After
firefox 0m5.1s 0m2.18s 0m0.22s 0m0.14s
google3 dir 2m3.9s 0m1.57s 0m8.12s 0m0.16s
Certain extensions, notably narrowhg, can depend on this for correctness
(not trying to recurse into directories for which it has no information).
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Mon, 13 Feb 2017 15:39:29 -0800] rev 31012
match: adding support for matching files inside a directory
This adds a new "rootfilesin" matcher type which matches files inside a
directory, but not any subdirectories (so it matches non-recursively).
This has the "root" prefix per foozy's plan for other matchers (rootglob,
rootpath, cwdre, etc.).
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 01:21:15 -0800] rev 31011
runtests: add an IPv6 command line flag
Now we have all IPv6 related issues fixed, add a command line flag so people
could actually run tests with IPv6.
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 08:43:59 -0800] rev 31010
runtests: always set web.ipv6
Previously, we only set web.ipv6 if IPv6 is used, but not on the IPv4 case.
Since we already have set web.address, it makes sense to move "web.ipv6" out
from "extra config options".
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 00:13:29 -0800] rev 31009
runtests: set web.address to localhost
Previously, "hg serve" will listen on "", which is not clear which interface
it will actually listen on - it could listen on all interfaces (ex. 0.0.0.0
on IPv4).
The run-tests.py script only checks "localhost" for available ports. So
let's make it the same for "hg serve" by explicitly setting "web.address" to
"localhost".
This resolves some IPv6 EADDRINUSE errors.
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 09:38:52 -0800] rev 31008
tests: use LOCALIP
This patch replaces hardcoded 127.0.0.1 with $LOCALIP in all tests.
Till now, the IPv6 series should make tests pass on common IPv6 systems
where the local device has the address "::1" and the hostname "localhost"
resolves to "::1".
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 23:24:03 -0800] rev 31007
dummyssh: use LOCALIP
This patch replaces hard-coded 127.0.0.1 with $LOCALIP in dummyssh.
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 08:01:19 -0800] rev 31006
runtests: export LOCALIP
Previously, tests hard-code local IP address as "127.0.0.1". That won't work
for IPv6.
This patch exports the $LOCALIP environment variable, which is set to "::1"
if we decide to use IPv6.
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 22:53:45 -0800] rev 31005
tinyproxy: use IPv6 if HGIPV6 is set to 1
This patch makes tinyproxy.py work in IPv6 mode if HGIPV6 is set to 1.
This will make test-http-proxy.t pass on IPv6 machines.
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 21:09:00 -0800] rev 31004
dumbhttp: use IPv6 if HGIPV6 is set to 1
This will fix flaky tests using dumbhttp.
The patch was tested on gcc112.fsffrance.org using the following command:
./run-tests.py -j 40 --runs-per-test 120 test-bundle2-remote-changegroup.t
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 21:03:42 -0800] rev 31003
runtests: export HGIPV6 to hint test scripts whether to use IPv6
Previously, run-tests.py only exports HGPORT, and scripts in tests do not
know if IPv6 should be used. And that breaks scripts like dumbhttp.py which
always uses IPv4.
This patch makes run-tests.py export HGIPV6, which can help test scripts
like dumbhttp.py and tinyproxy.py to decide whether to use IPv6 or not.
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 00:59:09 -0800] rev 31002
runtests: prefer IPv4 to IPv6
To make IPv6 work, there are multiple areas that need to fix. Before they
all get fixed, use IPv4 by default.
This should fix tests caused on IPv6 systems.
Rainer Woitok <Rainer.Woitok@Gmail.Com> [Fri, 17 Feb 2017 11:08:36 +0100] rev 31001
doc: correct example concerning "hg purge" alias in man page "hgrc.5"
The "hg purge" alias as currently described in "hgrc.5" issues a possibly
confusing error message like
rm: missing operand
Try 'rm --help' for more information.
if no files are to be purged at all.
This patch slightly modifies the example by adding a "-f" option to the
"rm" command.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:22:04 -0500] rev 31000
tests: prove that ignore works
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:52:47 -0500] rev 30999
annotate: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:55:54 -0500] rev 30998
ui: add a debug print right before we start the pager
This makes it easier to figure out why a command is getting paginated.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:42:04 -0500] rev 30997
ui: respect historic pager.attend-$COMMAND=no
I'm on the fence about this behavior, but the user's intent was pretty
specific and it's not expensive to support this case.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:45:30 -0500] rev 30996
tests: clean up a bunch of pager testing that is about to be invalidated
All this attend logic and potential bugs just no longer make sense to test.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:21:45 -0500] rev 30995
ui: add ignore-single-command functionality
This closes the last feature gap other than the attend list from the
extension. For now, I'm leaving the attend list in the extension,
because I'm unsure it has merit in a world where commands have been
updated to take advantage of the modern API.
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:48:03 -0500] rev 30994
ui: introduce neverpager() call
I'm about to add direct paging support to some commands, and as a
result we need a way to communicate from the higher layers of dispatch
that paging is explicitly disabled.
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:47:57 -0500] rev 30993
pager: move more behavior into core
This moves the global flag and the --pager=yes logic into core. Only
functionality change is that users now always get a --pager flag and
can enable the pager via the flag without the extension active.
Moving the flag into core exposes a defect in the ro localization,
which will have to be corrected later.
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:47:51 -0500] rev 30992
pager: move pager-initiating code into core
No functionality change.
A previous version of this API had a category argument on
ui.pager(). As I migrated the commands in core, I couldn't come up
with good enough consistency in any categorization scheme so I just
scrapped the whole idea. It may be worth revisiting in the future.
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 10:33:59 -0800] rev 30991
test-logtoprocess: use cat to wait for outputs
Commands started by logtoprocess are running asynchronously. To be able to
test the output, we need to block and wait for the output.
The patch uses "| cat" to wait for such "asynchronous" outputs, to make the
test more reliable. I have also written a short notice at the top, hopefully
people would be aware of the pitfall when changing the test.
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 23:10:47 -0800] rev 30990
chgserver: move comments in config example
"#" must be the first character of a line to mark the text as comments.
So let's change the docstring.