Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 08 Aug 2016 18:05:10 +0200] rev 29756
journal: take wlock for writting the 'shared' file
As we did for the shared extension itself, we add some locking around the write
of the 'shared' file.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 07 Aug 2016 17:15:19 +0200] rev 29755
debugbuilddag: take wlock to cover '.hg/localtags'
This debug command can write local tags. local tags are in the .hg directory and
should be covered by the 'wlock'. This is now covered.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 08 Aug 2016 17:33:45 +0200] rev 29754
fakemergerecord: take wlock to write the merge state
The merge state is supposed to be covered by the wlock. We fix the test
extensions to comply to that.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 07 Aug 2016 17:10:47 +0200] rev 29753
shared: take wlock for writting the 'shared' file
I do not see a reason why this should not be covered by the wlock.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 07 Aug 2016 17:00:45 +0200] rev 29752
mq: take wlock when 'qqueue' is doing write operations
Apparently when this command was added, the locking was forgotten. No code
changes beside the indentation from the locking context.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 09 Aug 2016 02:28:34 +0900] rev 29751
py3: make check-py3-compat.py use correct module name at loading pure modules
Before this patch, check-py3-compat.py implies unintentional ".pure"
sub-package name at loading pure modules, because module name is
composed by just replacing "/" in the path to actual ".py" file by
".".
This makes pure modules belong to "mercurial.pure" package, and
prevents them from importing a module belonging to "mercurial" package
relatively by "from . import foo" or so.
This is reason why pure modules fail to import another module
relatively only at examination by check-py3-compat.py.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 09 Aug 2016 02:28:34 +0900] rev 29750
py3: update output of check-py3-compat.py with python3
Recent work on mercurial/pure/mpatch.py made it import
mercurial.policy, and changed output of check-py3-compat.py with
python3 in test-check-py3-compat.t. But test-check-py3-compat.t isn't
yet updated.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 10:06:56 +0900] rev 29749
mpatch: raise MemoryError instead of mpatchError if lalloc() failed
MemoryError is handled differently in dispatch._runcatch().
Since mpatch_errors[] isn't that useful now, I've changed it to a simple
switch statement.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 07 Aug 2016 18:09:58 -0700] rev 29748
hgweb: config option to control zlib compression level
Before this patch, the HTTP transport protocol would always zlib
compress certain responses (notably "getbundle" wire protocol commands)
at zlib compression level 6.
zlib can be a massive CPU resource sink for servers. Some server
operators may wish to reduce server-side CPU requirements while
requiring more bandwidth. This is common on corporate intranets, for
example. Others may wish to use more CPU but reduce bandwidth.
This patch introduces a config option to allow server operators
to control the zlib compression level.
On the "mozilla-unified" generaldelta repository, setting this
value to "0" (disable compression) results in server-side CPU
utilization for a `hg clone` going from ~180s to ~124s CPU time on
my i7-6700K. A level of "1" (which increases the transfer size from
~1,074 MB at level 6 to ~1,222 MB) utilizes ~132s CPU time.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 06 Aug 2016 17:04:22 -0700] rev 29747
help: don't try to render a section on sub-topics
This patch subtly changes the behavior of the parsing of "X.Y" values
to not set the "section" variable when rendering a known sub-topic.
Previously, "section" would be the same as the sub-topic name. This
required the sub-topic RST to have a section named the same as the
sub-topic name.
When I made this change, the descriptions from help.internalstable
started being rendered in command line output. This didn't look correct
to me, as it didn't match the formatting of main help pages. I
corrected this by moving the top section to help.internalstable and
changing the section levels of all the "internals" topics.
The end result is that "internals" topics now match the rendering of
main topics on both the CLI and HTML. And, "internals" topics no longer
require a main section matching the name of the topic.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 15:01:16 +0200] rev 29746
branchmap: remove extra indent
This clean up the rest of the previous changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 15:00:53 +0200] rev 29745
branchmap: simplify error handlind when writing rev branch cache
Now that we have a general try except, we can move the error handling from the
individual writes in it.
Code will be reindented in the next changeset to help this on readability.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:57:16 +0200] rev 29744
branchmap: acquires lock before writting the rev branch cache
We now attempt to acquire a lock and write the branch cache within that lock.
This would prevent cache corruption when multiple processes try to write the cache
at the same time.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:54:46 +0200] rev 29743
branchmap: preparatory indent of indent the branch rev writing code
The rev branch cache is written without a lock, we are going to fix this but we
indent the code beforehand to make the next changeset clearer.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 09:47:07 +0900] rev 29742
mpatch: silence warning about maybe-uninitialized variable
It's false positive, but it wouldn't be possible for gcc to know
PyBytes_FromStringAndSize() sets PyErr_Occurred().
mercurial/mpatch_module.c:105:47: warning: 'r' may be used uninitialized
in this function [-Wmaybe-uninitialized]
PyErr_SetString(mpatch_Error, mpatch_errors[-r]);
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 09:40:30 +0900] rev 29741
mpatch: change lalloc() to local function
It was mistakenly made public at
b9b9f9a92481.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 09:49:07 +0900] rev 29740
mpatch: remove superfluous whitespaces
Hannes Oldenburg <hannes.christian.oldenburg@gmail.com> [Sun, 07 Aug 2016 14:06:20 +0000] rev 29739
cmdutil: remove duplicated badmatch call in cat()
Subrepo logic is handled in ctx.walk().
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 15:48:09 +0200] rev 29738
statichttprepo: do not try to write caches
The static http repository are read only, there is no hope in any cache
writing attempt.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 06 Aug 2016 22:24:33 +0900] rev 29737
demandimport: omit default value of "level" at construction of _demandmod
This makes construction of _demandmod require explicit level value,
and helps to avoid issues like
issue5208 in the future.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 06 Aug 2016 22:24:33 +0900] rev 29736
demandimport: import sub-module relatively as expected (
issue5208)
Before this patch, importing sub-module might (1) fail or (2) success
but import incorrect module, because demandimport tries to import
sub-module with level=-1 (on Python 2.x) or level=0 (on Python 3.x),
which is default value of "level" argument at construction of
"_demandmod" proxy object.
(1) on Python 3.x, importing sub-module always fails to import
existing sub-module
(2) both on Python 2.x and 3.x, importing sub-module might import
same name module on root level unintentionally
On Python 2.x, existing sub-module is prior to this unexpected
module. Therefore, this problem hasn't appeared.
To import sub-module relatively as expected, this patch specifies "1"
as import level explicitly at construction of "_demandmod" proxy
object for sub-module.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 06 Aug 2016 15:00:34 -0700] rev 29735
wireproto: remove gboptslist (API)
This variable has been unused since
ce25f465e572, which was over
2 years ago. gboptsmap should be used instead.
Marking as API because this could break extensions.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 06 Aug 2016 13:55:21 -0700] rev 29734
wireproto: unescape argument names in batch command (BC)
Clients escape both argument names and values when using the
batch command. Yet the server was only unescaping argument values.
Fortunately we don't have any argument names that need escaped. But
that isn't an excuse to lack symmetry in the code.
Since the server wasn't properly unescaping argument names, this
means we can never introduce an argument to a batchable command that
needs escaped because an old server wouldn't properly decode its name.
So we've introduced an assertion to detect the accidental introduction
of this in the future. Of course, we could introduce a server
capability that says the server knows how to decode argument names and
allow special argument names to go through. But until there is a need
for it (which I doubt there will be), we shouldn't bother with adding
an unused capability.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 06 Aug 2016 13:46:28 -0700] rev 29733
wireproto: consolidate code for obtaining "cmds" argument value
Both wireproto.py and sshpeer.py had code for producing the value to
the "cmds" argument used by the "batch" command. This patch extracts
that code to a standalone function and uses it.
Augie Fackler <augie@google.com> [Fri, 05 Aug 2016 15:35:02 -0400] rev 29732
revlog: use `iter(callable, sentinel)` instead of while True
This is functionally equivalent, but is a little more concise.
Augie Fackler <augie@google.com> [Fri, 05 Aug 2016 14:00:56 -0400] rev 29731
md5sum: use `iter(callable, sentinel)` instead of while True
This is functionally equivalent, but is a little more concise.
Augie Fackler <augie@google.com> [Fri, 05 Aug 2016 14:00:46 -0400] rev 29730
util: use `iter(callable, sentinel)` instead of while True
This is functionally equivalent, but is a little more concise.
Augie Fackler <augie@google.com> [Fri, 05 Aug 2016 14:00:39 -0400] rev 29729
url: use `iter(callable, sentinel)` instead of while True
This is functionally equivalent, but is a little more concise.
Augie Fackler <augie@google.com> [Fri, 05 Aug 2016 14:00:30 -0400] rev 29728
sshserver: use `iter(callable, sentinel)` instead of while True
This is functionally equivalent, but is a little more concise.
Augie Fackler <augie@google.com> [Fri, 05 Aug 2016 14:00:22 -0400] rev 29727
sshpeer: use `iter(callable, sentinel)` instead of while True
This is functionally equivalent, but is a little more concise.