Yuya Nishihara <yuya@tcha.org> [Tue, 04 Apr 2017 22:31:59 +0900] rev 31882
templater: make _hybrid provide more list/dict-like methods
So the JSON filter works.
Yuya Nishihara <yuya@tcha.org> [Tue, 04 Apr 2017 22:20:06 +0900] rev 31881
templater: hide private variable of _hybrid
Yuya Nishihara <yuya@tcha.org> [Tue, 04 Apr 2017 22:19:02 +0900] rev 31880
templater: remove __iter__() from _hybrid, resolve it explicitly
The goal is to fix "{hybrid_obj|json}" output.
A _hybrid object must act as a list or a dict as well as a generator of
legacy template strings. Before, _hybrid.__iter__() was assigned for legacy
template, which conflicted with list.__iter__() API.
This patch drops _hybrid.__iter__() and makes stringify/flatten functions
unwrap a generator instead.
Yuya Nishihara <yuya@tcha.org> [Sun, 24 Apr 2016 19:15:34 +0900] rev 31879
templater: rewrite doc of _hybrid class as docstring
Yuya Nishihara <yuya@tcha.org> [Sun, 09 Apr 2017 11:57:09 +0900] rev 31878
sortdict: fix .pop() to return a value
My future patch will need it.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 17:05:54 +0200] rev 31877
checkcode: only match pushd/popd as word
otherwise it partially match common words like "pushdestination".
Durham Goode <durham@fb.com> [Mon, 10 Apr 2017 13:07:47 -0700] rev 31876
treemanifest: add walksubtrees api
Adds a new function to treemanifest that allows walking over the directories in
the tree. Currently it only accepts a matcher to prune the walk, but in the
future it will also accept a list of trees and will only walk over subtrees that
differ from the versions in the list. This will be useful for identifying what
parts of the tree are new to this revision, which is useful when deciding the
minimal set of trees to send to a client given that they have a certain tree
already.
Since this is intended for an extension to use, the only current consumer is a
test. In the future this function may be useful for implementing other
algorithms like diff and changegroup generation.
Yuya Nishihara <yuya@tcha.org> [Tue, 11 Apr 2017 23:12:14 +0900] rev 31875
merge with stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:06:22 +0200] rev 31874
upgrade: drop the prefix to the '_finishdatamigration' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:06:12 +0200] rev 31873
upgrade: drop the prefix to the '_filterstorefile' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:05:57 +0200] rev 31872
upgrade: drop the prefix to the 'determineactions' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:05:42 +0200] rev 31871
upgrade: drop the prefix to the 'findimprovements' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:04:50 +0200] rev 31870
upgrade: drop the prefix to the 'supporteddestrequirements' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:03:11 +0200] rev 31869
upgrade: drop the prefix to the 'allowednewrequirements' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:01:29 +0200] rev 31868
upgrade: drop the prefix to the 'improvement' class
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:00:27 +0200] rev 31867
upgrade: drop the prefix to the 'supportremovedrequirements' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 17:56:29 +0200] rev 31866
upgrade: drop the prefix to the 'blocksourcerequirements' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 17:55:47 +0200] rev 31865
upgrade: drop the prefix to the 'requiredsourcerequirements' function
Now that we are in the 'upgrade' module we can simplify the name.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 07 Apr 2017 18:53:17 +0200] rev 31864
upgrade: extract code in its own module
Given about 2/3 or 'mercurial.repair' is now about repository upgrade, I think
it is fair to move it into its own module.
An expected benefit is the ability to drop the 'upgrade' prefix of many
functions. This will be done in coming changesets.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 09 Apr 2017 19:08:24 +0200] rev 31863
bundle2: move the 'close' method off the unpackermixin
This method is unrelated to unpacking and only used by the unbundle20 class.
We move it there for clarity.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 09 Apr 2017 18:12:54 +0200] rev 31862
bundle2: clarify the docstring of unpackermixin methods
The unpackermixin is a utility used to implement the bundle2 protocol. It should
not be used when writing part handlers. We update the docstring to clarify this.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 09 Apr 2017 18:16:09 +0200] rev 31861
bundle2: add documention to 'part.addparams'
There are some non-obvious limitations on the parameters of this method.
Add some documentation where people will likely look to understand how
to use this API.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 10 Apr 2017 21:12:54 -0400] rev 31860
test-patchbomb: disable sendmail tests on Windows
These tests were failing, and there isn't a trivial way to execute a script on
Windows [1].
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/096497.html
Ryan McElroy <rmcelroy@fb.com> [Fri, 07 Apr 2017 10:46:32 -0700] rev 31859
show: fix corrupt json output with no bookmarks
Ryan McElroy <rmcelroy@fb.com> [Fri, 07 Apr 2017 10:26:13 -0700] rev 31858
show: tweak plain abort language for clarity
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Apr 2017 22:19:27 -0400] rev 31857
tests: print Unix style paths in *.py tests
These tests don't support (glob). I didn't audit all tests, but these ones were
failing.
Jun Wu <quark@fb.com> [Sun, 09 Apr 2017 12:53:31 -0700] rev 31856
revlog: make "size" diverge from "rawsize"
Previously, revlog.size equals to revlog.rawsize. However, the flag
processor framework could make a difference - "size" could mean the length
of len(revision(raw=False)), while "rawsize" means len(revision(raw=True)).
This patch makes it so.
This corrects "hg status" output when flag processor is involved. The call
stack looks like:
basectx.status -> workingctx._buildstatus -> workingctx._dirstatestatus
-> workingctx._checklookup -> filectx.cmp -> filelog.cmp -> filelog.size
-> revlog.size
Jun Wu <quark@fb.com> [Fri, 07 Apr 2017 10:56:53 -0700] rev 31855
test-flagprocessor: add a case about hg status
This shows how "hg status" is wrong - nothing changed but the file is
labeled as "M".
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Apr 2017 15:06:45 -0400] rev 31854
test-http-proxy: add the Windows variant of "connection refused"
The full error is "No connection could be made because the target machine
actively refused it".
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Apr 2017 15:01:49 -0400] rev 31853
test-fileset: eliminate a duplicate test that was conditionalized for output
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Apr 2017 14:55:44 -0400] rev 31852
test-fileset: glob away hash differences
There are various files committed above that can't be used on Windows because of
the name, or being a symlink.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Apr 2017 14:46:39 -0400] rev 31851
test-bundle: glob away a URL protocol separator
MSYS thinks the ':' is a Unix path separator, and replaces it with ';'.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Apr 2017 00:10:54 -0400] rev 31850
templatekw: clarify the result of {latesttag} when no tag exists
My initial expectation was that the list would be empty, and therefore
detectable with {if()}. The map for {latesttag()} is populated with real values
in this case (except {tag}), so it probably doesn't make any sense to change
this to an empty list.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 06 Apr 2017 19:24:04 +0200] rev 31849
hgweb: position the "followlines" box close to latest cursor position
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 06 Apr 2017 19:15:09 +0200] rev 31848
hgweb: add a floating tooltip to invite on followlines action
In followlines.js, we create a <div id="followlines-tooltip"> element to draw
attention of users on "followlines" feature. The element shows up on hover of
source lines after one second and follows the cursor. After first click (start
line selection), the text changes and indicates that next click will terminate
selection.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Apr 2017 14:33:20 -0700] rev 31847
zstd: vendor python-zstandard 0.8.1
This contains a fix for compilation on BSDs.
#no-check-commit
Olivier Trempe <oliviertrempe@gmail.com> [Wed, 08 Mar 2017 09:03:42 -0500] rev 31846
fsmonitor: match watchman and filesystem encoding
watchman's paths encoding can differ from filesystem encoding. For example,
on Windows, it's always utf-8.
Before this patch, on Windows, mismatch in path comparison between fsmonitor
state and osutil.statfiles would yield a clean status for added/modified files.
In addition to status reporting wrong results, this leads to files being
discarded from changesets while doing history editing operations such as rebase.
Benchmark:
There is a little overhead at module import:
python -m timeit "import hgext.fsmonitor"
Windows before patch: 1000000 loops, best of 3: 0.563 usec per loop
Windows after patch: 1000000 loops, best of 3: 0.583 usec per loop
Linx before patch: 1000000 loops, best of 3: 0.579 usec per loop
Linux after patch: 1000000 loops, best of 3: 0.588 usec per loop
10000 calls to _watchmantofsencoding:
python -m timeit -s "from hgext.fsmonitor import _watchmantofsencoding, _fixencoding" "fname = '/path/to/file'" "for i in range(10000):" " if _fixencoding: fname = _watchmantofsencoding(fname)"
Windows (_fixencoding is True): 100 loops, best of 3: 19.5 msec per loop
Linux (_fixencoding is False): 100 loops, best of 3: 3.08 msec per loop
Ryan McElroy <rmcelroy@fb.com> [Fri, 07 Apr 2017 06:31:50 -0700] rev 31845
pull: abort pull --update if config requires destination (
issue5528)
Ryan McElroy <rmcelroy@fb.com> [Fri, 07 Apr 2017 05:41:03 -0700] rev 31844
tests: move update requiredest test to own test file
More tests for this flag are coming in upcoming patches.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Apr 2017 23:35:51 +0530] rev 31843
py3: add pycompat.unicode and add it to importer
On python 3, builtins.unicode does not exist.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Apr 2017 16:00:44 +0530] rev 31842
py3: add a bytes version of urllib.parse.urlencode() to pycompat.py
urllib.parse.urlencode() returns unicodes on Python 3. This commit adds a
method which will take its output and encode it to bytes so that we can use
bytes consistently.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Apr 2017 13:46:35 +0530] rev 31841
py3: replace str() with bytes()
Jun Wu <quark@fb.com> [Fri, 07 Apr 2017 11:02:43 -0700] rev 31840
metadataonlyctx: replace "changeset()[0]" to "manifestnode()"
As Yuya pointed out [1], "changeset()[0]" could be simplified to
"manifestnode()". I didn't notice that method earlier. It should definitely
be used - it's easier to read, and faster.
[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095716.html
Jun Wu <quark@fb.com> [Fri, 07 Apr 2017 11:09:54 -0700] rev 31839
test-check-pylint: match its output
"pylint --version" shows:
pylint 2.0.0,
astroid 1.5.0
Python 2.7.13 (default, Dec 21 2016, 07:16:46)
[GCC 6.2.1
20160830]
I got "Your code has been rated at 10.00/10" every time and didn't know how
to turn it off. Therefore the fix.
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 19:01:51 -0700] rev 31838
test-flagprocessor: remove unnecessary greps
The "2>&1 | egrep ..." code is used for removing uninteresting parts from
tracebacks. Now the test does not dump tracebacks, they can be removed.
Jun Wu <quark@fb.com> [Mon, 03 Apr 2017 09:31:39 -0700] rev 31837
bundlerepo: use raw revision in revdiff()
This is similar to "revlog: use raw revisions in revdiff". revdiff()
generates raw text used in revlog directly.
This makes test-flagprocessor.t happy.
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:45:47 -0700] rev 31836
bundlerepo: fix raw handling in revision()
Similar to fixes in revlog.py, this patch uses "rawtext" to explicitly label
contents expected to be raw, and makes sure content stored in _cache is raw
text.
Now test-flagprocessor.t points us to another issue.
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 18:06:42 -0700] rev 31835
bundlerepo: build revlog index with flags
This fixes bundlerevlog.flags(rev) for any revisions provided by the bundle.
Now test-flagprocessor.t points us to another issue.
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:43:29 -0700] rev 31834
bundlerepo: make baserevision return raw text
"baserevision" returns the text that will be used to apply deltas. Since
deltas are against raw texts, "baserevision" should return raw text.
Now test-flagprocessor.t points us to a new error.
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:24:36 -0700] rev 31833
test-flagprocessor: add tests about bundlerepo
This shows flag processor is broken with a bundle repo.
The test creates non-liner history to exercise code path where the
deltaparent cannot be reused.
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:23:20 -0700] rev 31832
test-flagprocessor: use changegroup3 in bundle2
This will force "hg bundle" to use changegroup3 in the test. It is
important since only changegroup3 preserves revlog flags.
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:01:58 -0700] rev 31831
bundle: allow bundle command to use changegroup3 in tests
Since bundle2 writes changegroup version, we can just reuse the bundle2
format for changegroup3.
This won't enable the bundle command to write changegroup3 in the wild,
since exchange.parsebundlespec only returns changegroup2. It unlocks tests
to override exchange.parsebundlespec and get "hg bundle" write changegroup3.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 23:44:22 -0400] rev 31830
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 23:17:27 -0400] rev 31829
run-tests: support per-line conditional output in tests
Duplicating entire tests just because the output is different is both error
prone and can make the tests harder to read. This harnesses the existing '(?)'
infrastructure, both to improve readability, and because it seemed like the path
of least resistance.
The form is:
$ test_cmd
output (hghave-feature !) # required if hghave.has_feature(), else optional
out2 (no-hghave-feature2 !) # req if not hghave.has_feature2(), else optional
I originally extended the '(?)' syntax. For example, this:
2 r4/.hg/cache/checkisexec (execbit ?)
pretty naturally reads as "checkisexec, if execbit". In some ways though, this
inverts the meaning of '?'. For '(?)', the line is purely optional. In the
example, it is mandatory iff execbit. Otherwise, it is carried forward as
optional, to preserve the test output. I tried it the other way, (listing
'no-exec' in the example), but that is too confusing to read. Kostia suggested
using '!', and that seems fine.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 22:59:44 -0400] rev 31828
test-run-tests: pad the failure test to preserve the run order
Test size seems to dictate the order in which the tests are run, and the next
patch will add to test-success.t. Similar to
c0cecc153d25.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 22:00:33 -0400] rev 31827
run-tests: prevent a (glob) declaration from reordering (?) lines
Previously, if a series of optional output lines marked with '(?)' had a (glob)
in one of the first lines, the output would be reordered such that it came last
if none of the lines were output. The (re) declaration wasn't affected, which
was helpful in figuring this out. There were no tests for '(re) (?)' so add
that to make sure everything plays nice.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Apr 2017 13:45:33 +0530] rev 31826
py3: use pycompat.byteskwargs() to convert opts to bytes
We have converted opts to unicodes before passing them.
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 22:10:46 -0700] rev 31825
test-check-code: do not use xargs
We have too many files, and passing them via arguments could cause strange
errors on some platforms [1]. Since check-code.py can now take "-" and read
file names from stdin, use it instead of xargs to avoid the argv size limit.
[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/096346.html
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 22:08:23 -0700] rev 31824
check-code: use "-" to specify a list of files from stdin
This will be used by the next patch.
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 06 Apr 2017 14:41:42 +0200] rev 31823
perf: add historical portability for util.timer
util.timer has been introduced in
ae5d60bb and used in perf.py since
22fbca1d.
For historical portability, forcibly define util.timer in perf.py