FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 29 Mar 2014 01:20:07 +0900] rev 20858
hg: introduce "wirepeersetupfuncs" to setup wire peer by extensions (
issue4109)
Since changeset
6f72e7d28b35, "reposetup()" of each extensions is
invoked only on repositories enabling corresponded extensions.
This causes that largefiles specific interactions between the
repository enabling largefiles locally and remote (wire) peer fail,
because there is no way to know whether largefiles is enabled on the
remote repository behind the wire peer, and largefiles specific
"wireproto functions" are not given to any wire peers.
To avoid this problem, largefiles should be enabled in wider scope
than each repositories (e.g. user-wide "${HOME}/.hgrc").
This patch introduces "wirepeersetupfuncs" to setup wire peer by
extensions already enabled. Functions registered into
"wirepeersetupfuncs" are invoked for all wire peers.
This patch uses plain list instead of "util.hooks" for
"wirepeersetupfuncs", because the former allows to control order of
function invocation by order of extension enabling: it may be useful
for workaround of problems with combination of enabled extensions
Sean Farley <sean.michael.farley@gmail.com> [Thu, 27 Mar 2014 17:21:27 -0500] rev 20857
templater: raise error for unknown func
Previously, if a template '{foo()}' was given, the buildfunc would not be able
to match it and hit a code path that would not return so it would error out
later in the templater stating that NoneType was not iterable. This patch makes
sure that a proper error is raised so that the user can be informed.
Tests have been updated.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 18 Mar 2014 14:29:33 -0700] rev 20856
bundle2: support bundling of empty part (with a type)
Here start the work on bundle2 parts. Our first step is to be able to bundle a simplistic
part that just have a type, no parameters, empty payload.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 18:51:49 -0700] rev 20855
revsetbenchmark: add a summary at the end of execution
The summary list timing per revset making it much more easier to compare
revision to each other.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 18:39:56 -0700] rev 20854
revsetbenchmark: retrieve the benchmark value in python
We retrieve the output of the perf extension and print it ourself. This open the
door to processing of this data in the script.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 18:36:19 -0700] rev 20853
revsetbenchmark: get revision to benchmark in a function
And move it to proper subprocess call.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 18:27:17 -0700] rev 20852
revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 18:26:18 -0700] rev 20851
revsetbenchmark: convert performance call to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 18:14:15 -0700] rev 20850
revsetbenchmark: convert update to proper subprocess call
Matt Mackall <mpm@selenic.com> [Thu, 27 Mar 2014 16:52:24 -0500] rev 20849
revsetbenchmark: fix semicolon
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 18:03:30 -0700] rev 20848
revsetbenchmark: simplify and convert the script to python
The script is now in python. That translation is very raw, more improvement to
comes:
The "current code" and "base" entry have been dropped. This is trivial to get
same result using a tagged revision or "." in the list of benchmarked revision.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 16:38:08 -0700] rev 20847
revsetbenchmapi: fix template
The revision description missed an \n
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 26 Mar 2014 17:25:11 -0700] rev 20846
perf: unroll the result in perfrevset
With the new lazy revset implementation, we need to actually read all elements
to trigger all the computations. Otherwise a no-op if of course much faster than
the full work.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 20 Mar 2014 18:55:28 -0700] rev 20845
_addset: add a __len__ method
Back in the time where repo.revs(...) returned a list, calling `len(...)` on the
result was quite common. We reinstall this on _addset.
There is absolutely no easy way to test this from the command line. The commands
using this in the evolve extension will eventually land into core.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 19 Mar 2014 17:53:45 -0700] rev 20844
bundle2: implement the mandatory/advisory logic for parameter
Parameter starting with an upper case are mandatory, the one starting with a
lower case are advisory and may be ignored.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 19 Mar 2014 17:11:49 -0700] rev 20843
bundle2: print debug information during unbundling
The unbundler class is now feed with an ui object and use it to transmit data
about the unbundling process.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 18 Mar 2014 19:07:10 -0700] rev 20842
bundle2: print debug information during bundling
The bundler class is now feed with an ui object and use it to transmit data
about the bundling process.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 19 Mar 2014 02:36:21 -0700] rev 20841
bundle2: add ability to write to a file to the test
Next changesets are about improving debug output during bundling. We won't be
able to simply bundle to stdin in this case. The bundle2 stream would be
interleaved with debug output.
Siddharth Agarwal <sid0@fb.com> [Fri, 21 Mar 2014 16:09:17 -0700] rev 20840
subrepo: factor out Git version check to add doctests
Followup to
6a2acb0d9352::
e5641536e4d5.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 15 Feb 2014 19:51:20 +0900] rev 20839
contrib: add "hgperf" command to measure performance of commands easily
Newly added "hgperf" command repeats "dispatch.runcommand()" for
specified Mercurial command and measure performance of it in the same
manner of "contrib/perf.py" extension.
Users (mainly developers) can examine performance of the target
command easily, without adding new entry for it to "contrib/perf.py"
extension.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 15 Feb 2014 19:54:14 +0900] rev 20838
grep: exit loop immediately, if matching is found in the file for "hg grep -l"
Before this patch, internal function "display()" of "hg grep" is not
efficient for "-l"/"--files-with-matches", because loop is continued,
even after the first matching is found in the specified file.
This patch exits loop immediately, if matching is found for
"--files-with-matches".
In this case, "before is None" is equal to "opts.get('files_with_matches')".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 15 Feb 2014 19:54:05 +0900] rev 20837
grep: use "found" instead of "filerevmatches" examination for efficiency
Before this patch, internal function "display()" of "hg grep" stores
whether matching is already found or not into the dictionary
"filerevmatches" by "(fn, rev)" tuple as the key.
But this is redundant, because:
- "filerevmatches" is local variable of "display()", so each
"display()" invocations don't affect others
- both "fn" and "rev" (gotten from "ctx" argument) are never changed
in each "display()" invocations
Then, "filerevmatches" should have only one entry at most, and "(fn,
rev) in filerevmatches" should be equal to "found".
This patch uses "found" instead of "filerevmatches" examination for
efficiency.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 15 Feb 2014 19:52:36 +0900] rev 20836
grep: reuse the first "util.binary()" result for efficiency
Before this patch, to check whether the file in the specified revision
is binary or not, "util.binary()" is invoked via internal function
"binary()" of "hg grep" once per a line of "hg grep" output, even
though binary-ness is not changed in the same file.
This patch reuses the first "util.binary()" invocation result by
annotating internal function "binary()" with "@util.cachefunc".
Performance improvement measured by "hgperf grep -r
88d8e568add1 vfs
mercurial/scmutil.py":
before this patch:
! wall 0.024000 comb 0.015600 user 0.015600 sys 0.000000 (best of 118)
after this patch:
! wall 0.023000 comb 0.015600 user 0.015600 sys 0.000000 (best of 123)
Status of recent(
88d8e568add1) "mercurial/scmutil.py":
# of lines: 919 (may affect cost of search)
# of bytes: 29633 (may affect cost of "util.binary()")
# of matches: 22 (may affect frequency of "util.binary()")
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 15 Feb 2014 19:52:26 +0900] rev 20835
util: add the code path to "cachefunc()" for the function taking no arguments
Before this patch, "util.cachefunc()" caches the value returned by the
specified function into dictionary "cache", even if the specified
function takes no arguments.
In such case, "cache" has at most one entry, and distinction between
entries in "cache" is meaningless.
This patch adds the code path to "cachefunc()" for the function taking
no arguments for efficiency: to store only one cached value, using
list "cache" is a little faster than using dictionary "cache".
Matt Mackall <mpm@selenic.com> [Wed, 26 Mar 2014 12:52:57 -0500] rev 20834
help: add examples to incoming
Durham Goode <durham@fb.com> [Tue, 25 Mar 2014 16:10:07 -0700] rev 20833
revset: fix generatorset race condition
If two things were iterating over a generatorset at the same time, they could
miss out on the things the other was generating, resulting in incomplete
results. This fixes it by making it possible for two things to iterate at once,
by always checking the _genlist at the beginning of each iteration.
I was only able to repro it with pending changes from my other commits, but they
aren't ready yet. So I'm unable to add a test for now.
Olle Lundberg <geek@nerd.sh> [Tue, 25 Mar 2014 23:07:52 +0100] rev 20832
tests: don't hardcode path to bash interpreter
Use the env binary to figure out the correct bash to use.
Certain systems ships with an ancient version of bash, but the
user might have installed a newer one that is earlier in $PATH.
For example the current version of Mac OS X ships version 3.2.51
of bash, which does not understand new fancy builtins such as
readarray. A user might install a newer version of bash, use that
as their shell and add that path before bin.
Olle Lundberg <geek@nerd.sh> [Wed, 26 Mar 2014 11:59:13 +0100] rev 20831
contrib: don't hardcode path to bash interpreter
Use the env binary to figure out the correct bash to use.
Certain systems ships with an ancient version of bash, but the
user might have installed a newer one that is earlier in $PATH.
For example the current version of Mac OS X ships version 3.2.51
of bash, which does not understand new fancy builtins such as
readarray. A user might install a newer version of bash, use that
as their shell and add that path before bin.
Olle Lundberg <geek@nerd.sh> [Tue, 25 Mar 2014 23:10:15 +0100] rev 20830
contrib: explicitly enable perf extension for revset tests
If a developer doesn't have the perf extension enabled the revset
benchmarking will fail. This patch explicitly enables the
perf extension when running the tests.
Matt Mackall <mpm@selenic.com> [Tue, 25 Mar 2014 16:17:16 -0500] rev 20829
merge with stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 24 Mar 2014 20:00:18 -0700] rev 20828
revset: improve performance of _generatorset.__contains__ (issue 4201)
_generatorset.__contains__ and __contains__ from child classes were
calling into __iter__ to look for values. Since all
previously-encountered values from the generator were cached and checked
in __contains__ before this iteration, __contains__ was effectively
performing iteration busy work which could lead to an explosion of
redundant work.
This patch changes __contains__ to be more intelligent. Instead of
looking at all values via __iter__, __contains__ will instead go
straight to "new" values from the underlying generator.
On a clone of the Firefox repository with around 200,000 changesets,
this patch decreases the execution time of the revset '::(200067)::'
from ~100s to ~4s on the author's machine. Rebase operations (which use
the aforementioned revset), speed up accordingly.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 22 Mar 2014 23:39:51 +0900] rev 20827
localrepo: omit ".hgsubstate" also from "added" files
Before this patch, "localrepository.commit()" omits ".hgsubstate" from
"modified" (changes[0]) and "removed" (changes[2]) file list before
checking subrepositories, but leaves one in "added" (changes[1]) as it
is.
Then, "localrepository.commit()" adds ".hgsubstate" into "modified" or
"removed" list forcibly, according to subrepository statuses.
If "added" contains ".hgsubstate", the committed context will contain
two ".hgsubstate" in its "files": one from "added" (not omitted one),
and another from "modified" or "removed" (newly added one).
How many times ".hgsubstate" appears in "files" changes node hash,
even though revision content is same, because node hash calculation
uses the specified "files" directly (without duplication check or so).
This means that node hash of committed revision changes according to
existence of ".hgsubstate" in "added" at "localrepository.commit()".
".hgsubstate" is treated as "added", not only in accidental cases, but
also in the case of "qpush" for the patch adding ".hgsubstate".
This patch omits ".hgsubstate" also from "added" files before checking
subrepositories. This patch also omits ".hgsubstate" exclusion in
"qnew"/"qrefresh" introduced by changeset
d666da075b91, because this
patch makes them meaningless.
"hg parents --template '{files}\n'" newly added to "test-mq-subrepo.t"
enhances checking unexpected multiple appearances of ".hgsubstate" in
"files" of created/refreshed MQ revisions.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 07 Mar 2014 14:06:52 -0500] rev 20826
dispatch: only do __import__(debugger) when a debugger is requested
When having ui.debugger=somedebugger in one's ~/.hgrc, this then
somedebugger would be imported for every hg command. With this patch,
this import only happens if the --debugger parameter is passed.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 25 Mar 2014 19:34:17 +0900] rev 20825
hg: use "os.path.join()" to join path components which may be empty (
issue4203)
Changset
2d0ab571b822 rewriting "hg.copystore()" with vfs uses
'dstbase + "/lock"' instead of "os.path.join()", because target files
given from "store.copyfiles()" already uses "/" as path separator
But in the repository using revlog format 0, "dstbase" becomes empty
("data" directory is located under ".hg" directly), and 'dstbase +
"/lock"' is treated as "/lock": in almost all cases, write access to
"/lock" causes "permission denied".
This patch uses "os.path.join()" to join path components which may be
empty in "hg.copystore()".
Matt Harbison <matt_harbison@yahoo.com> [Mon, 24 Mar 2014 21:27:40 -0400] rev 20824
revset: document the regular expression support for tag(name)
This has been supported since
20f55613fb2a, in 2.3.
Matt Mackall <mpm@selenic.com> [Sat, 22 Mar 2014 14:46:55 -0500] rev 20823
help: allow -k to find debug commands
Mads Kiilerich <madski@unity3d.com> [Sat, 15 Mar 2014 16:14:04 +0100] rev 20822
help: let 'hg help debug' show the list of secret debug commands
The names of the debug commands are not easy to remember and they are not easy
to find.
Mads Kiilerich <madski@unity3d.com> [Fri, 28 Feb 2014 02:09:00 +0100] rev 20821
tests: add run-tests --changed option for running tests changed in revisions
Convenient when polishing patches and changing details of how they change test
output.
This will probably break in weird ways for revsets with special quoting ... but
it is good enough for run-tests.
Usage example:
yes | ./run-tests.py -li --changed qparent
Mads Kiilerich <madski@unity3d.com> [Wed, 19 Mar 2014 00:18:30 +0100] rev 20820
repo: rephrase the "missing requirement" error message
Unknown requirements will now be reported as:
abort: repository requires features unknown to this Mercurial: largefiles!
(see http://mercurial.selenic.com/wiki/MissingRequirement for more information)
Some features of this phrasing:
* avoid double ':' in abort message
* make it more clear who requires and knows what
* don't quote the requirement names - it is not something the user entered or
need the exact spelling of ... and it is "identifiers" that are unambiguous
anyway
* remove double hint by removing "(upgrade Mercurial)" comment
* don't mention upgrading Mercurial without mentioning enabling the feature -
instead, just refer to wiki page for both
* don't just talk about "details", talk about "more information"
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 20 Mar 2014 17:34:02 -0700] rev 20819
revpair: drop useless conditional
The `if not revs:` case is tested at the beginning of the function.
Matt Mackall <mpm@selenic.com> [Fri, 21 Mar 2014 17:20:56 -0500] rev 20818
merge with stable
Siddharth Agarwal <sid0@fb.com> [Thu, 20 Mar 2014 19:39:05 -0700] rev 20817
subrepo: add trailing newlines to warnings
Siddharth Agarwal <sid0@fb.com> [Thu, 20 Mar 2014 19:38:17 -0700] rev 20816
subrepo: convert matched string to integer before comparing Git version
(1, '4') is greater than (1, 5) so the version check never actually worked.
Siddharth Agarwal <sid0@fb.com> [Thu, 20 Mar 2014 19:37:01 -0700] rev 20815
subrepo: only retrieve the first two components of the Git version
This makes the version detection compatible with Git versions like '1.9-rc0'.
We only cared about the first two components of the version anyway.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 18 Mar 2014 18:56:08 -0700] rev 20814
bundle2: force the first char of parameter to be an letter.
We need a case sensitive character to convey mandatory/advisory parameter
semantic in a later patches.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 18 Mar 2014 18:40:31 -0700] rev 20813
bundle2: refuse empty parameter name
The bundle2 now raise value error when seeing invalid parameter names. The first
introduced rules is: no empty parameter.
The test extension is improve to properly abort when ValueError are encountered.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 18 Mar 2014 17:43:08 -0700] rev 20812
bundle2: urlunquote stream parameter name and value during unbundling
Align to new escaping used during bundling.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 18 Mar 2014 17:38:11 -0700] rev 20811
bundle2: urlquote stream parameter name and value
This introduces support for arbitrary characters in stream parameters name and
value. The urlquote format has been chosen because it is:
- simple,
- standard,
- no-op on simple alphanumerical entry.