Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 Jul 2017 20:58:34 +0200] rev 33189
acl: use configlist to retrieve the source config
This is what the previous code was about.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:27:07 +0200] rev 33188
configitems: register the 'acl.sources' config
The existing default value is now formally declared. It seems like the whole
config should be a list, but this is an adventure for the next changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:26:57 +0200] rev 33187
configitems: register the 'acl.config' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:31:51 +0200] rev 33186
config: register the 'devel.legacy.exchange' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:31:35 +0200] rev 33185
configitems: register the 'bundle.reorder' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:31:26 +0200] rev 33184
configitems: register the 'bundle.mainreporoot' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:28:28 +0200] rev 33183
configitems: register the 'bookmarks.pushing' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:27:18 +0200] rev 33182
configitems: register the 'auth.cookiefile' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 30 Jun 2017 03:32:09 +0200] rev 33181
configitems: register the 'color.mode' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 Jul 2017 21:57:17 +0200] rev 33180
zeroconf: blindly forward extra argument to the core config method
The new default value handling is simpler if we let the original function handle
everything.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 Jul 2017 20:16:54 +0200] rev 33179
configitem: fix default value for 'serverrequirecert'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 30 Jun 2017 01:47:49 +0900] rev 33178
localrepo: factor out base of filecache annotation class
It isn't needed that storecache is derived from repofilecache.
Changes in this patch allow repofilecache and storecache to do in own
__init__() differently from each other.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 30 Jun 2017 01:47:48 +0900] rev 33177
manifest: apply checkambig=True only for root 00manifest.i
This is a fix for my 14ad8e2a4abe, which used 'bool(dir)' as
checkambig value for revlog.__init__().
I can't remember why I did so in 14ad8e2a4abe, but this is obviously
wrong, because only root indexfile is cached via filecache-ed property
of localrepository.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Jul 2017 19:35:17 -0700] rev 33176
revlog: address review feedback for deltachain C implementation
* Scope of "value" is reduced
* index_baserev() is documented
* Error is no longer redundantly set for -2 return values
* Error values are compared <= -2 instead of == -2 to protect
against odd failure scenarios
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Jul 2017 15:13:09 -0400] rev 33175
test-rebase-interruptions: stabilize for Windows
External hooks end up launching cmd.exe, which knows nothing about $VAR syntax.
For some reason, I thought that Mercurial would substitute in the value, in
order to paper over the platform difference. But I can't find that in the
documentation, and there's at least one other use of this pattern [1].
[1] https://www.mercurial-scm.org/repo/hg/file/tip/tests/test-histedit-fold.t#l477
Martin von Zweigbergk <martinvonz@google.com> [Fri, 30 Jun 2017 23:15:09 -0700] rev 33174
drawdag: inline transaction() function
I suspect Jun wrote the method before he learnt that Python 2.7 allows
multiple context managers in a single with-clause.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 25 Jun 2017 12:41:34 -0700] rev 33173
revlog: C implementation of delta chain resolution
I've seen revlog._deltachain() appear in a number of performance
profiles. I suspect there are 2 reasons for this:
1. Delta chain resolution performs many index lookups, thus triggering
population of index tuples. Creating possibly tens of thousands of
PyObject will have overhead.
2. Delta chain resolution is a tight loop.
By moving delta chain resolution to C, we can defer instantiation
of full index entry tuples and make the loop faster courtesy of
not running in Python.
We can measure the impact to delta chain resolution via
`hg perflogrevision` using the mozilla-central repo with a recent
manifest having delta chain length of 33726:
$ hg perfrevlogrevision -m 364895
! full
! wall 0.367585 comb 0.370000 user 0.340000 sys 0.030000 (best of 27)
! wall 0.357581 comb 0.360000 user 0.350000 sys 0.010000 (best of 28)
! deltachain
! wall 0.010644 comb 0.010000 user 0.010000 sys 0.000000 (best of 270)
! wall 0.000292 comb 0.000000 user 0.000000 sys 0.000000 (best of 8729)
$ hg perfrevlogrevision --cache -m 364895
! deltachain
! wall 0.003904 comb 0.000000 user 0.000000 sys 0.000000 (best of 712)
! wall 0.000284 comb 0.000000 user 0.000000 sys 0.000000 (best of 9926)
The first test measures savings from both not instantiating index
entries and moving to C. The second test (which doesn't clear the
index caches) essentially isolates the benefits of moving from Python
to C. It still shows a 13.7x speedup (versus 36.4x). And there are
multiple milliseconds of savings within the critical path for resolving
revision data. I think that justifies the existence of C code.
A more striking example of the benefits of this change can be
demonstrated by timing `hg debugdeltachain -m` for the mozilla-central
repo:
$ time hg debugdeltachain -m > /dev/null
before: 1057.4s
after: 503.3s
PyPy2.7 5.8.0: 220.0s
It's worth noting that the C code isn't as optimal as it could be.
We're still instantiating a new PyObject for every revision. A future
optimization would be to reuse the PyObject on the cached index tuple.
We could potentially also get wins by using a memory array of raw
integers. There is also room for a delta chain cache on revlog
instances. Of course, the best optimization is to implement revlog
reading outside of Python so Python doesn't need to be concerned
about the relatively expensive index entries and operations on them.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:36 +0200] rev 33172
config: register the 'devel.strip-obsmarkers' config
The single explicit default that existed so far is converted to registered
config value.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:28 +0200] rev 33171
config: register the 'devel.serverrequirecert' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:18 +0200] rev 33170
config: register the 'devel.serverexactprotocol' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:07 +0200] rev 33169
config: register the 'devel.servercafile' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:31:18 +0200] rev 33168
config: register the 'devel.disableloaddefaultcerts' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:31:05 +0200] rev 33167
config: register the 'devel.check-relroot' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:37:59 +0200] rev 33166
config: register the devel.check-locks config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:25:33 +0200] rev 33165
config: register the 'devel.bundle2.debug' config
Existing explicit default are dropped now that the default is centralised.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:19:40 +0200] rev 33164
config: register the 'devel.all-warnings' config
Let us start registering the existing option. I'm starting with the 'devel'
section because it is full of useful things that are poorly documented. So
registering these will more than other section.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 28 Jun 2017 14:53:54 -0700] rev 33163
rebase: always pass destination as revnum to _handleskippingobsolete()
We were passing it as a revision number in one place and as a context
in another. It worked because the only use was in "repo[dest].rev()",
but it was confusing. By always passing a revision number, we can also
remove that unnecessary lookup.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 29 Jun 2017 23:04:47 -0700] rev 33162
patch: remove unused fsbackend._join()
The function lost its last caller in 2a095d3442e0 (patch: replace
functions in fsbackend to use vfs, 2014-06-05) when the callers
started relying on the opener to do the join.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 30 Jun 2017 09:07:24 -0700] rev 33161
patch: add close() to abstractbackend
patchbackend() seems to call it on an arbitrary backend, so it seems
to be part of the API. Since all subclasses do something in their
close() methods, I decided to let this one raise an exception rather
than just pass.
Boris Feld <boris.feld@octobus.net> [Mon, 26 Jun 2017 15:46:24 +0200] rev 33160
log: add an extension hook-point in changeset_printer
Extensions sometimes wants to add other information in the default log output
format (when no templating is used).
Add an empty function named '_exthook' for easing the extension life.
Extensions will be able to wrap this function and collaborate to display
additional information.
Exthook is called after displaying troubles and just before displaying the
files, extra and description.
Add a new test file to test it and not pollute other test files.
Jun Wu <quark@fb.com> [Tue, 27 Jun 2017 00:01:17 -0700] rev 33159
drawdag: support obsmarker creation in comments
This patch adds special comment handling so one can create obsmarkers in
drawdag comments like "# replace: A -> B -> C", "# prune: X, Y, Z",
"split: P -> M, N" and they are just self-explained.
Jun Wu <quark@fb.com> [Mon, 26 Jun 2017 23:31:53 -0700] rev 33158
test-drawdag: add a test for drawdag.py
The drawdag script is useful but does not have a formal test. This patch
adds it.
Phil Cohen <phillco@fb.com> [Mon, 26 Jun 2017 22:52:15 -0700] rev 33157
filemerge: convert a couple of wvfs calls in internal mergetools to contexts
One hitch is that sometimes fcd is actually an absentfilectx which does not
expose any mutator functions. In order to still use the context functions,
we look up the underlying workingfilectx to perform the write there.
One alternate way would be to put the write functions on the absentfilectx and
have them pass-through. While this makes the callsites cleaner, we would need
to decide what its getter functions would return after this point, since
returning None for `data` (and True for `isabsent()`) might no longer be
correct after a write. I discussed with Sidd about just having the getters
raise RuntimeErrors after a mutator has been called, but we actually call
isabsent() in merge.py after running the internal merge tools.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:50:20 +0200] rev 33156
configitems: support callable as a default value
Yuya pointed out that using mutable value as the default could be problematic.
To work around this we now support callable object as default value. This
allows for creating new mutable objects on demand when needed.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Jun 2017 02:06:15 +0200] rev 33155
obsutil: move 'getmarkers' to the new modules
We have a new 'obsutil' module now. We move the high level utility there to
bring 'obsolete.py' back to a more reasonable size.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Jun 2017 01:51:40 +0200] rev 33154
obsutil: move the 'marker' class to the new modules
We have a new 'obsutil' module now. We move high level utility there to bring
'obsolete.py' back to a more reasonable size.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Jun 2017 01:48:41 +0200] rev 33153
obsolete: delete three unused utility functions
None of this function has been used in the past 5 years, so I think it is safe
to just kill them. All code accessing rich markers is using 'getmarkers(...)'
instead (or raw markers).
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Jun 2017 01:40:34 +0200] rev 33152
obsutil: move 'foreground' to the new modules
We have a new 'obsutil' module now. We move the high level utility there to
bring 'obsolete.py' back to a more reasonable size.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Jun 2017 01:36:20 +0200] rev 33151
obsutil: move 'allsuccessors' to the new modules
We have a new 'obsutil' module now. We move the high level utility there to bring
'obsolete.py' back to a more reasonable size.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Jun 2017 01:31:18 +0200] rev 33150
obsutil: move 'allprecursors' to the new modules
We have a new 'obsutil' module now. We move the high level utility there to
bring 'obsolete.py' back to a more reasonable size.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Jun 2017 01:11:56 +0200] rev 33149
obsutil: move 'exclusivemarkers' to the new modules
We have a new 'obsutil' module now. We move the high level utility there to
bring 'obsolete.py' back to a more reasonable size.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 27 Jun 2017 01:03:01 +0200] rev 33148
obsutil: move 'successorssets' to the new modules
We have a new 'obsutil' module now. We move this high level utility there to bring
'obsolete.py' back to a more reasonable size.
Adam Simpkins <simpkins@fb.com> [Thu, 29 Jun 2017 11:29:19 -0700] rev 33147
tests: fix variable name regular expression in _genrestoreenv()
Update the code to correctly anchor the expression on the end of the name, to
require that the entire name match this expression. It was already anchored at
the start by using re.match(), but this does not anchor it at the end.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 29 Jun 2017 15:21:52 -0700] rev 33146
merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 17:41:25 +0200] rev 33145
pushrace: avoid crash on bare push when using concurrent push mode
If the remote is empty, we do now bother computing head changes and the
'pushbranchmap' attribute stays at None.
We now handle and tests this case.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 25 Jun 2017 22:20:37 -0700] rev 33144
show: config option to register aliases for views
As part of using `hg show` in my daily workflow, I've found it slightly
annoying to have to type full view names, complete with a space. I've
locally registered an alias for "swork = show work."
I think others will have this same complaint and could benefit from
some automation to streamline the creation of aliases. So, this
commit introduces a config option that allows `hg show` views to be
automatically aliased using a given prefix. e.g. a value of "s"
will automatically register "swork" and "sbookmarks." Multiple
values can be given for ultimate flexibility. This arguably isn't
needed now. But since we don't register aliases if there will be
a collision and we're bound to have a collision, it makes sense to
allow multiple prefixes so specific views can avoid collisions by
using different prefixes.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 18 Jun 2017 20:49:08 +0200] rev 33143
blackbox: use a human readable version of the default
Now that the default value is also converted we can use a human readable version
for it. This will be useful if we start to automatically display the default
config value in various place.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jun 2017 13:21:06 +0200] rev 33142
configitems: register 'blackbox.maxsize' as an example of 'configbytes'
This exercise the default value handling in 'configbytes'.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jun 2017 13:41:28 +0200] rev 33141
blackbox: minor code reordering
The version declaration should come first in my opinion. This will help gather
the command table with the config table.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 18 Jun 2017 19:52:54 +0200] rev 33140
configitems: add a devel warning for extensions items overiding core one
We do not want such case to pass silently. In the future we'll likely have
useful tool for an extension to alter the existing definition in core.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jun 2017 13:48:20 +0200] rev 33139
configitems: add an official API for extensions to register config item
Extensions can have a 'configtable' mapping and use
'registrar.configitem(table)' to retrieve the registration function.
This behave in the same way as the other way for extensions to register new
items (commands, colors, etc).
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jun 2017 13:38:53 +0200] rev 33138
configitems: extract the logic to build a registrar on any configtable
Having the logic available independently from the mapping used is a necessary
step toward extensions support.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jun 2017 01:08:11 +0200] rev 33137
obsolete: skip 'changectx' usage in unstable computation
We simplify the unstable computation code, skipping the expensive creation of
changectx object. We focus on efficient set operation and revnumber centric
functions.
In my mercurial development repository, this provides a 3x speedup to the
function:
before: 5.319 ms
after: 1.844 ms
repo details:
total changesets: 40886
obsolete changesets: 7756
mutable (not obsolete): 293
unstable: 30
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 18 Jun 2017 22:38:11 +0200] rev 33136
obsolete: provide a small function to retrieve all mutable revisions
More obsolescence related algorithm focus on the mutable revision. We provide a
tiny utility function to make it easy to access this set.
Siddharth Agarwal <sid0@fb.com> [Tue, 27 Jun 2017 14:38:00 -0700] rev 33135
bundle2: add debug info about the number of stream params
Seems like the %i was never substituted.
Siddharth Agarwal <sid0@fb.com> [Tue, 27 Jun 2017 14:30:55 -0700] rev 33134
bundle2: add some debugging information to the not-a-bundle error
I found this useful while trying to debug wireproto-related issues.
Adam Simpkins <simpkins@fb.com> [Wed, 28 Jun 2017 12:23:22 -0700] rev 33133
tests: more completely restore the environment in syshgenv
Update the syshgenv function to attempt to completely restore the original
environment, rather than only updating a few specific variables. run_tests.py
now generates a shell script that can be used to restore the original
environment, and syshgenv sources it.
This is a bit more complicated than the previous code, but should do a better
job of running the system hg in the correct environment.
I've tested it on Linux using python 2.x, but let me know if it causes issues
in other environments. I'm not terribly familiar with how the tests get run on
Windows, for instance, and how the environment needs to be updated there.
Jun Wu <quark@fb.com> [Wed, 28 Jun 2017 13:45:51 -0700] rev 33132
tests: do not use system hg if it does not have "files" command
Ancient hg does not have "hg files" so test-check-*.t will fail with
"unknown command 'files'":
$ hg files
hg: unknown command 'files'
$ hg --version
Mercurial Distributed SCM (version 2.6.2)
Test "hg files" and give up using syshg if it does not have "files" command.
Adam Simpkins <simpkins@fb.com> [Wed, 28 Jun 2017 10:50:37 -0700] rev 33131
setup: fix runcmd() usage on darwin
Fix one invocation of runcmd() that was missed in the recent change to
make runcmd() also return the process exit status.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 27 Jun 2017 21:16:08 +0530] rev 33130
py3: update the python3-whitelist with new tests which pass on Python 3
We have now 34 tests passing on Python 3.