Matt Harbison <matt_harbison@yahoo.com> [Sun, 23 Dec 2018 01:05:20 -0500] rev 41049
exthelper: correct a documentation typo
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Nov 2018 22:10:07 -0500] rev 41048
lfs: convert to using exthelper to wrap functions
I'm not 100% sure that upgraderequirements() can be double annotated safely, but
it seems OK based on printing the address of the function being wrapped.
One thing I've noticed is that @eh.reposetup doesn't do the usual check to
ensure that it's a local repo. Should that be baked into @eh.reposetup()
somehow, possibly with a non-default option to skip the check? It seems like a
gaping hole if every function that gets registered needs to add this check.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 30 Nov 2018 21:39:55 -0500] rev 41047
tests: convert a test extension to use exthelper
This provides test coverage to uipopulate().
Matt Harbison <matt_harbison@yahoo.com> [Sat, 22 Dec 2018 22:44:24 -0500] rev 41046
exthelper: drop fileset/revset/template support for now
Yuya raised concerns about duplicating registrar functionality. There are a
couple of ideas to work around this, which would allow bringing them back, and
then backporting to evolve. For now, I just want to get the subsequent changes
landed before the bulk b'' rewrite makes rebasing too hard.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 22 Dec 2018 22:26:36 -0500] rev 41045
exthelper: simplify configitem registration
Matt Harbison <matt_harbison@yahoo.com> [Sat, 22 Dec 2018 21:06:24 -0500] rev 41044
extensions: import the exthelper class from evolve
980565468003 (API)
This should help make extensions that wrap a lot of stuff more comprehendible.
It was copied unmodified, except:
- fix up the imports
- rename final_xxxsetup() -> finalxxxsetup() to appease checkcode
- avoid a [] default arg to wrapcommand()
.. api::
Add `exthelper` class to simplify extension writing by allowing functions,
commands, and configitems to be registered via annotations. The previous
APIs are still available for use.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 21 Dec 2018 10:13:49 -0800] rev 41043
narrow: detect if narrowspec was changed in a different share
With this commit, `hg share` should be usable with narrow
repos. Design explained on
https://www.mercurial-scm.org/wiki/NarrowSharePlan
I was running into cache invalidation problems when updating the
narrowspec. After spending a day trying to figure out a good solution,
I resorted to just assigning repo.narrowpats and repo._narrowmatch
after invalidating them.
Differential Revision: https://phab.mercurial-scm.org/D5278
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Jul 2018 11:26:46 -0700] rev 41042
tests: add test for narrow+share
For how narrow+share is supposed to work, see
https://www.mercurial-scm.org/wiki/NarrowSharePlan.
Differential Revision: https://phab.mercurial-scm.org/D5276
Martin von Zweigbergk <martinvonz@google.com> [Mon, 10 Dec 2018 10:39:48 -0800] rev 41041
narrow: keep narrowspec backup in store
As suggested by Yuya in review of D4099.
Differential Revision: https://phab.mercurial-scm.org/D5470
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 Oct 2018 22:56:31 -0700] rev 41040
tests: update narrowspec when narrowspec, not dirstate, is accessed
test-narrow-expanddirstate.t mimics a Google-internal extension that
updates the narrowspec whenever the dirstate is accessed. Since
1d09ba0d2ed3 (narrow: move remaining narrow-limited dirstate walks to
core, 2018-10-01) and a few commits before it, we no longer restrict
repo.dirstate.walk() to the narrowspec. It is instead done at a higher
level (e.g. context.status()). We were running into problems with the
Google-internal extension when importing those commits. The issue was
that the narrowspec was read before the first dirstate access. I
believe the right fix is to instead update the narrowspec when trying
to read it (not when reading the dirstate), so that's what this patch
does.
Differential Revision: https://phab.mercurial-scm.org/D5275
Martin von Zweigbergk <martinvonz@google.com> [Fri, 21 Dec 2018 09:48:30 -0800] rev 41039
merge: extract helper for creating empty "actions" dict
Replicating the set of actions in multiple places is bad.
Differential Revision: https://phab.mercurial-scm.org/D5472
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Dec 2018 22:22:23 -0800] rev 41038
manifest: accept narrowmatch into constructor instead of getting from repo
The manifest should ideally not know at all about the repo, so this is
just a little step towards cleaning that up.
Differential Revision: https://phab.mercurial-scm.org/D5469
Matt Harbison <matt_harbison@yahoo.com> [Sat, 22 Dec 2018 00:05:39 -0500] rev 41037
py3: byteify one more sys.argv in gendoc.py
Boris Feld <boris.feld@octobus.net> [Wed, 19 Dec 2018 15:45:29 +0100] rev 41036
test: introduce a new flag to display env variable line per line
It's easier to conditionalize some of the environment variables per Mercurial
version once there is only one value per line.
Differential Revision: https://phab.mercurial-scm.org/D5453
Boris Feld <boris.feld@octobus.net> [Fri, 21 Dec 2018 05:08:32 +0100] rev 41035
revlog: add an explicit test for `issnapshot`
We test the method on a real revlog containing "real" data.
Boris Feld <boris.feld@octobus.net> [Thu, 20 Dec 2018 12:17:15 +0100] rev 41034
revlog: add some direct testing of the slicing logic
This test check slicing backed by an actual revlog. It will test the C version
of slicing (if the test are run with the C extensions).
Boris Feld <boris.feld@octobus.net> [Wed, 19 Dec 2018 10:54:25 +0100] rev 41033
revlog: limit base to rev size ratio to 500 instead of 50
While a value of 50 provided large speedup in some case (400s → 7s) it also
creates a slow down for a whole class of revision we are seeing in a private
repository (0.1s → 3s). A value of 500 makes them disappear improving the
total runtime (the slower revision still improve significantly (400s → 21s)).
We need to run a wider array of tests on various repositories to see the
effect on speed and size of different values for this acceptable constant.
However, in the meantime, it seems safer to move back to a less impactful
value.
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 21 Dec 2018 15:31:16 +0300] rev 41032
contrib: remove unused version of os
Caught by test-check-pyflakes.t
Differential Revision: https://phab.mercurial-scm.org/D5471
Matt Harbison <matt_harbison@yahoo.com> [Thu, 20 Dec 2018 23:16:58 -0500] rev 41031
py3: convert `'{}'.format(foo)` to `'%s' % foo` in the bookflow extension
Byte strings don't have the former. Converting these to byte strings is waiting
on the mass rewrite.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 20 Dec 2018 18:12:29 -0500] rev 41030
py3: byteify sys.argv in gendoc.py
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 Dec 2018 09:34:32 -0800] rev 41029
repository: update interface signature of narrowmatch()
This should have been part of
4fd0fac48922 (localrepo: allow
narrowmatch() to accept matcher to intersect with, 2018-09-28) and
41fcdfe3bfeb (narrow: allow repo.narrowmatch(match) to include exact
matches from "match", 2018-10-01).
Differential Revision: https://phab.mercurial-scm.org/D5466
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Dec 2018 15:30:56 -0800] rev 41028
narrow: when narrowing, write new narrowspec before removing revlogs
If revlogs were removed and then the process crashed before the
narrowspec was written, the repo would be corrupt.
Differential Revision: https://phab.mercurial-scm.org/D5467
Martin von Zweigbergk <martinvonz@google.com> [Fri, 23 Nov 2018 22:12:04 -0800] rev 41027
narrow: replace "ui.warn(); return 1" by "raise error.Abort()"
This is the usual way of doing it and I don't see a reason to do it
differently here.
Differential Revision: https://phab.mercurial-scm.org/D5468
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 16 Dec 2018 00:21:54 -0500] rev 41026
test-bookmarks-pushpull: add failing test of
issue4700
Differential Revision: https://phab.mercurial-scm.org/D5447
Boris Feld <boris.feld@octobus.net> [Wed, 19 Dec 2018 15:42:20 +0100] rev 41025
tests: update printenv.py argument parsing
We are about to introduce a new flag for printing the HG environment variables
one per line and it's easier to do when using the argparse module for argument
parsing.
Differential Revision: https://phab.mercurial-scm.org/D5452
Augie Fackler <augie@google.com> [Thu, 20 Dec 2018 01:22:58 -0500] rev 41024
fuzz: new fuzzer for parsers.fm1readmarkers
Differential Revision: https://phab.mercurial-scm.org/D5465
Augie Fackler <raf@durin42.com> [Sun, 06 Jan 2019 14:58:54 -0500] rev 41023
server: always close http socket if responding with an error (
issue6033)
It's possible for hgweb to respond _very_ early with an error if we're
catching certain types of errors. When we do, we need to tell the client
the socket is toast when there's a POST involved because otherwise there
can be lingering POST data on the socket that will confuse any future
requests on the socket. This manifested as a flaky failure on Linux in an
lfs extension test and a reliable failure on FreeBSD. With this patch
applied, test-lfs-serve-access.t now passes for me on FreeBSD.
Differential Revision: https://phab.mercurial-scm.org/D5498
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Jan 2019 15:44:55 +0900] rev 41022
match: fix assertion for fileset with no context (
issue6046)
A falsy changectx should be allowed.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Jan 2019 21:01:10 -0500] rev 41021
templatekw: fix documentation typos
Yuya Nishihara <yuya@tcha.org> [Wed, 02 Jan 2019 09:41:04 +0900] rev 41020
update: do not pass in user revspec as default destination (
issue6044)
When the revsingle() was introduced at
61c0df2b089a, it couldn't handle
revspec=0 (not '0') properly. That's probably why the default was set to
rev.
This is technically BC since "hg update ''" was identical to "hg update '.'"
whereas "hg update -r ''" is "hg update", but I believe that's a bug given
no test fails with this change.
Boris Feld <boris.feld@octobus.net> [Sun, 30 Dec 2018 16:11:06 +0100] rev 41019
revlog: cache delta base value under -1
Such base are invalid so we better report them early.
Boris Feld <boris.feld@octobus.net> [Thu, 27 Dec 2018 23:34:37 +0100] rev 41018
revlog: catch revlog corruption in index_baserev
A revision cannot use a base above itself, it can only happens one corrupted
repository.
Ignoring such corrupted could lead to infinite loop.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 21 Dec 2018 17:36:12 -0500] rev 41017
phabricator: properly encode boolean types in the request body
I tripped over this playing with `hg debugcallconduit` to query for valid
reviewers. If the JSON on stdin is written as 'True' or 'False', python
complains it isn't valid JSON. If it's written as 'true' or 'false', it made it
to the server, but got kicked back with this:
abort: Conduit Error (ERR-CONDUIT-CORE): Error while reading "isBot":
Expected boolean (true or false), got something else.
The test isn't really relevant here (the code can be reverted, and it will
pass), but this gives us coverage for the debug command.
Augie Fackler <augie@google.com> [Thu, 20 Dec 2018 01:26:39 -0500] rev 41016
parsers: better bounds checking in fm1readmarkers
Our Python already calls this with reasonable values consistently, but
my upcoming fuzzer is extremely quick to discover the lack of sanity
checking here.
Differential Revision: https://phab.mercurial-scm.org/D5464
Augie Fackler <augie@google.com> [Wed, 19 Dec 2018 23:48:35 -0500] rev 41015
fuzz: new fuzzer for dirstate parser
Differential Revision: https://phab.mercurial-scm.org/D5463
Augie Fackler <augie@google.com> [Wed, 19 Dec 2018 20:26:53 -0500] rev 41014
fuzz: new fuzzer for revlog's parse_index2 method
Differential Revision: https://phab.mercurial-scm.org/D5462
Augie Fackler <augie@google.com> [Wed, 19 Dec 2018 21:57:23 -0500] rev 41013
fuzz: extract Python initialization to utility package
Avoids code duplication between fuzzers of parsers.so.
Differential Revision: https://phab.mercurial-scm.org/D5461
Augie Fackler <augie@google.com> [Wed, 19 Dec 2018 23:40:37 -0500] rev 41012
fuzz: remove probably-wrong -fsanitize from fuzzutil.o rule
Differential Revision: https://phab.mercurial-scm.org/D5460
Augie Fackler <augie@google.com> [Wed, 19 Dec 2018 23:51:02 -0500] rev 41011
parsers: remove long-dead parse_manifest method
We haven't used this in years, I think it's fine to ditch it now. We
had previously kept it around to ease bisecting with built extensions,
but these days we've got a better versioning scheme anyway. Noticed
this method kicking around while looking in parsers.so for likely
fuzzing targets.
Differential Revision: https://phab.mercurial-scm.org/D5459
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Dec 2018 09:33:42 -0800] rev 41010
help: hide default value for default-off flags
If we no longer show the "[no-]" for default-off flags, it also seems
unnecessary to show the "default: off" for them, since that's quite
clearly the default. It's extra confusing for action flags like `hg
bookmarks --delete`.
Differential Revision: https://phab.mercurial-scm.org/D5455
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Dec 2018 09:20:32 -0800] rev 41009
help: show "[no-]" only for default-on Flags
As Anton (av6) pointed out, the "[no-]" is confusing for action flags
like `hg bookmark --delete`. We could come up with a way of indicating
which flags are action flags (e.g. use None for the default value
instead of False). However, it's probably also unlikely that users
will want to negate even non-action flags like --hidden.
One of the more common flags where the "[no-]" prefix would be useful
is `hg evolve --update`. The reason it's helpful there is that it
defaults to on. So I think we can simply include "[no-]" only for
flags that are on by default (and thus require the user to add the
"[no-]" for the option to have any effect).
Note that there are use cases for negating flags that already off by
default. For example, you may have an alias for `hg log -G --hidden -T
foo` and now want to pass "--no-hidden" to that alias. However, I
think that users who want that are likely to be advanced enough that
they've already learnt about the "no-" prefix by seeing it somewhere
else.
Differential Revision: https://phab.mercurial-scm.org/D5454
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Dec 2018 15:37:03 -0800] rev 41008
shelve: drop unnecessary backup of narrowspec
I mechanically added the backup code everywhere in
ad24b581e4d9
(narrow: call narrowspec.{save,restore,clear}backup directly,
2018-08-03), but I can't think of a reason it would be needed in the
shelve code, so let's drop it.
Differential Revision: https://phab.mercurial-scm.org/D5457
Martin von Zweigbergk <martinvonz@google.com> [Mon, 07 May 2018 17:08:17 -0700] rev 41007
shelve: pass transaction around to clarify where it's used
Differential Revision: https://phab.mercurial-scm.org/D5456
Matt Harbison <matt_harbison@yahoo.com> [Wed, 19 Dec 2018 13:35:11 -0500] rev 41006
py3: byteify docchecker
The exception is printed as str because I'm too lazy to convert it and the
pieces.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 19 Dec 2018 13:32:42 -0500] rev 41005
py3: replace hard coded `python` with $PYTHON in check-gendoc
Matt Harbison <matt_harbison@yahoo.com> [Tue, 18 Dec 2018 21:17:27 -0500] rev 41004
py3: byteify gendoc.py
This is mostly b'' prefixing, with some cargoculting of help.py to get around
`textwrap.dedent()` and __doc__ string requirements.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 19 Dec 2018 14:51:21 -0500] rev 41003
py3: use bytes stdout in hghave.py
This fixes a failure in test-run-tests.t around notarealhghavefeature. It seems
crazy to me that all of this needs to be adjusted in all of these tests, but the
line as run-tests.py sees it in _processoutput() before doing anything is
already mangled with a trailing '\r'. Switching to normalizenewlines=True for
TTest works, but I'm sure that breaks other stuff.
Boris Feld <boris.feld@octobus.net> [Wed, 19 Dec 2018 02:57:48 +0100] rev 41002
perfrevlogwrite: fix a typo in the option name
The submitted patches was apparently damaged, and a 's' was missing.