Thu, 06 Apr 2017 17:43:29 -0700 bundlerepo: make baserevision return raw text
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.
Thu, 06 Apr 2017 17:24:36 -0700 test-flagprocessor: add tests about bundlerepo
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.
Thu, 06 Apr 2017 17:23:20 -0700 test-flagprocessor: use changegroup3 in bundle2
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.
Thu, 06 Apr 2017 17:01:58 -0700 bundle: allow bundle command to use changegroup3 in tests
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.
Wed, 05 Apr 2017 23:44:22 -0400 tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 23:44:22 -0400] rev 31830
tests: add per-line output conditionals for Windows
Wed, 05 Apr 2017 23:17:27 -0400 run-tests: support per-line conditional output in tests
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.
Wed, 05 Apr 2017 22:59:44 -0400 test-run-tests: pad the failure test to preserve the run order
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.
Wed, 05 Apr 2017 22:00:33 -0400 run-tests: prevent a (glob) declaration from reordering (?) lines
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.
Fri, 07 Apr 2017 13:45:33 +0530 py3: use pycompat.byteskwargs() to convert opts to bytes
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.
Thu, 06 Apr 2017 22:10:46 -0700 test-check-code: do not use xargs
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
Thu, 06 Apr 2017 22:08:23 -0700 check-code: use "-" to specify a list of files from stdin
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.
Thu, 06 Apr 2017 14:41:42 +0200 perf: add historical portability for util.timer
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
Wed, 05 Apr 2017 15:31:08 -0700 diff: add --binary option for git mode diffs
Alexander Fomin <afomin@fb.com> [Wed, 05 Apr 2017 15:31:08 -0700] rev 31822
diff: add --binary option for git mode diffs This patch adds --binary option to `hg diff` and `hg export` to allow more control about when binary diffs are displayed in Git mode as well as some tests to verify it behaves correctly (issue5510).
Wed, 05 Apr 2017 15:15:06 -0700 patch: make diff in git mode respect --text option (issue5510)
Alexander Fomin <afomin@fb.com> [Wed, 05 Apr 2017 15:15:06 -0700] rev 31821
patch: make diff in git mode respect --text option (issue5510) This changeset makes patch respect -a/--text option in --git mode by aligning its behaviour with git itself.
Wed, 05 Apr 2017 00:34:58 +0900 py3: have registrar process docstrings in bytes
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Apr 2017 00:34:58 +0900] rev 31820
py3: have registrar process docstrings in bytes Mixing bytes and unicode creates a mess. Do things in bytes as possible. New sysbytes() helper only takes care of ASCII characters, but avoids raising nasty unicode exception. This is the same design principle as sysstr().
Tue, 04 Apr 2017 16:49:12 +0200 localrepo: fix deprecation version for 'repo._link'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 04 Apr 2017 16:49:12 +0200] rev 31819
localrepo: fix deprecation version for 'repo._link' The patch lingered for a while and nobody noticed when it was resubmitted.
Tue, 04 Apr 2017 16:48:58 +0200 localrepo: fix deprecation version for 'repo.join'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 04 Apr 2017 16:48:58 +0200] rev 31818
localrepo: fix deprecation version for 'repo.join' The patch lingered for a while and nobody noticed when it was resubmitted.
Mon, 03 Apr 2017 19:45:09 -0400 tests: make zstd-related output optional
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 19:45:09 -0400] rev 31817
tests: make zstd-related output optional Caught by the buildbot with --pure, fix suggested by indygreg.
Mon, 03 Apr 2017 18:58:00 -0400 check-code: update test IP address enforcement checks
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:58:00 -0400] rev 31816
check-code: update test IP address enforcement checks Instead of mentioning 127.0.0.1, we should use $LOCALIP. Anytime $LOCALIP appears in output, we should make sure we use (glob) on that line of output so that weird environments that do remapping jiggery pokery (such as our FreeBSD buildbot that's in a jail) don't get spurious test failures.
Mon, 03 Apr 2017 18:56:44 -0400 tests: fix missing (glob) annotations in test-push-http.t
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:56:44 -0400] rev 31815
tests: fix missing (glob) annotations in test-push-http.t
Mon, 03 Apr 2017 18:56:29 -0400 tests: fix missing (glob) annotations in test-push-http-bundle1.t
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:56:29 -0400] rev 31814
tests: fix missing (glob) annotations in test-push-http-bundle1.t
Mon, 03 Apr 2017 18:56:08 -0400 tests: fix missing (glob) annotations in test-https.t
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:56:08 -0400] rev 31813
tests: fix missing (glob) annotations in test-https.t
Mon, 03 Apr 2017 18:55:55 -0400 tests: fix missing (glob) annotations in test-bundle2-exchange.t
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:55:55 -0400] rev 31812
tests: fix missing (glob) annotations in test-bundle2-exchange.t
Mon, 03 Apr 2017 19:03:34 -0400 util: fix %-formatting on docstring by moving a closing parenthesis
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 19:03:34 -0400] rev 31811
util: fix %-formatting on docstring by moving a closing parenthesis We have to do the % formatting over the sysstr, since the things we're going to splat into it are themselves sysstrs. This is probably technically wrong-ish, since bt is probably actually a bytestr here, but this fixes the immediate issue, which was that hg was broken on Python 3.
Sun, 02 Apr 2017 22:16:03 +0900 revset: stop supporting plain list as input set (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 22:16:03 +0900] rev 31810
revset: stop supporting plain list as input set (API) There was no deprecwarn(), but this is the same kind of API compatibility as the one removed by the previous patch.
Sun, 02 Apr 2017 22:01:32 +0900 revset: stop supporting predicate that returns plain list (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 22:01:32 +0900] rev 31809
revset: stop supporting predicate that returns plain list (API) It's said to be removed after 3.9.
Sat, 01 Apr 2017 12:24:59 +0200 mdiff: add a hunkinrange helper function
Denis Laxalde <denis@laxalde.org> [Sat, 01 Apr 2017 12:24:59 +0200] rev 31808
mdiff: add a hunkinrange helper function This factors out hunk filtering logic by line range that is similar in mdiff.blocksinrange() and hgweb.webutil.diffs().
Fri, 22 Apr 2016 21:46:33 +0900 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org> [Fri, 22 Apr 2016 21:46:33 +0900] rev 31807
templater: provide loop counter as "index" keyword This was originally written for JSON templating where we would have to be careful to not add extra comma, but seems generally useful. Inner loop started by % operator has its own counter.
Fri, 22 Apr 2016 21:45:06 +0900 templater: rename variable "i" to "v" in runmap()
Yuya Nishihara <yuya@tcha.org> [Fri, 22 Apr 2016 21:45:06 +0900] rev 31806
templater: rename variable "i" to "v" in runmap() I want to reuse "i" for index.
Sun, 02 Apr 2017 22:43:18 +0900 formatter: reorder code that builds template mapping
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 22:43:18 +0900] rev 31805
formatter: reorder code that builds template mapping This makes the future patch slightly simpler.
Sun, 02 Apr 2017 18:40:13 -0700 revlog: avoid applying delta chain on cache hit
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:40:13 -0700] rev 31804
revlog: avoid applying delta chain on cache hit Previously, revlog.revision(raw=False) may try to apply the delta chain on _cache hit. That happens if flags are non-empty. This patch makes rawtext reused so delta chain application is avoided. "_cache" and "rev" are moved a bit to avoid unnecessary assignments.
Sun, 02 Apr 2017 18:29:24 -0700 revlog: indent block to make review easier
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:29:24 -0700] rev 31803
revlog: indent block to make review easier
Sun, 02 Apr 2017 18:25:12 -0700 revlog: avoid calculating "flags" twice in revision()
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:25:12 -0700] rev 31802
revlog: avoid calculating "flags" twice in revision() This is more consistent with other code in "revision()" - prefer performance to code length.
Sun, 02 Apr 2017 18:57:03 -0700 revlog: use raw revision for rawsize
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:57:03 -0700] rev 31801
revlog: use raw revision for rawsize When writing the revlog-ng index, the third field is len(rawtext). See revlog._addrevision: textlen = len(rawtext) .... e = (offset_type(offset, flags), l, textlen, base, link, p1r, p2r, node) self.index.insert(-1, e) Therefore, revlog.index[rev][2] returned by revlog.rawsize should be len(rawtext), where "rawtext" is revlog.revision(raw=True). Unfortunately it's hard to add a test for this code path because "if l >= 0" catches most cases.
Sat, 14 May 2016 20:51:57 +0900 revsetlang: enable optimization of 'x + y' expression
Yuya Nishihara <yuya@tcha.org> [Sat, 14 May 2016 20:51:57 +0900] rev 31800
revsetlang: enable optimization of 'x + y' expression It's been disabled since 4d1e56b29a91, but it can be enabled now as the ordering requirement is resolved at analyze().
Sat, 08 Apr 2017 11:36:39 -0700 repair: use rawvfs when copying extra store files stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Apr 2017 11:36:39 -0700] rev 31799
repair: use rawvfs when copying extra store files If we use the normal vfs, store encoding will be applied when we .join() the path to be copied. This results in attempting to copy a file that (likely) doesn't exist. Using the rawvfs operates on the raw file path, which is returned by vfs.readdir(). Users at Mozilla are encountering this, as I've instructed them to run `hg debugupgraderepo` to upgrade to generaldelta. While Mercurial shouldn't deposit any files under .hg/store that require encoding, it is possible for e.g. .DS_Store files to be created by the operating system.
Sat, 08 Apr 2017 11:35:29 -0700 tests: add test demonstrating buggy path handling stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Apr 2017 11:35:29 -0700] rev 31798
tests: add test demonstrating buggy path handling `hg debugupgraderepo` is currently buggy with regards to path handling when copying files in .hg/store/. Specifically, it applies the store filename encoding to paths instead of operating on raw files. This commit adds a test demonstrating the buggy behavior.
Sat, 08 Apr 2017 11:35:00 -0700 repair: iterate store files deterministically stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Apr 2017 11:35:00 -0700] rev 31797
repair: iterate store files deterministically An upcoming test will add a 2nd file. Since readdir() is non-deterministic, add a sorted() to make traversal deterministic.
Sat, 01 Apr 2017 15:24:03 -0700 zstd: vendor python-zstandard 0.8.0
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 15:24:03 -0700] rev 31796
zstd: vendor python-zstandard 0.8.0 Commit 81e1f5bbf1fc54808649562d3ed829730765c540 from https://github.com/indygreg/python-zstandard is imported without modifications (other than removing unwanted files). Updates relevant to Mercurial include: * Support for multi-threaded compression (we can use this for bundle and wire protocol compression). * APIs for batch compression and decompression operations using multiple threads and optimal memory allocation mechanism. (Can be useful for revlog perf improvements.) * A ``BufferWithSegments`` type that models a single memory buffer containing N discrete items of known lengths. This type can be used for very efficient 0-copy data operations. # no-check-commit
Sat, 01 Apr 2017 13:43:52 -0700 commands: update help for "unbundle"
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 13:43:52 -0700] rev 31795
commands: update help for "unbundle" Similar to the recent change to "bundle," this command no longer just deals with "changegroup" data.
Sat, 01 Apr 2017 13:43:43 -0700 commands: update help for "bundle"
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 13:43:43 -0700] rev 31794
commands: update help for "bundle" We now have a dedicated help topic to describe bundle specification strings. Let's update `hg bundle`'s documentation to reflect its existence. While I was hear, I also tweaked some wording which I felt was out of date and needed tweaking. Specifically, `hg bundle` no longer just deals with "changegroup" data: it can also generate files that have non-changegroup data.
Sat, 01 Apr 2017 13:42:06 -0700 help: document bundle specifications
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 13:42:06 -0700] rev 31793
help: document bundle specifications I softly formalized the concept of a "bundle specification" a while ago when I was working on clone bundles and stream clone bundles and wanted a more robust way to define what exactly is in a bundle file. The concept has existed for a while. Since it is part of the clone bundles feature and exposed to the user via the "-t" argument to `hg bundle`, it is something we need to support for the long haul. After the 4.1 release, I heard a few people comment that they didn't realize you could generate zstd bundles with `hg bundle`. I'm partially to blame for not documenting it in bundle's docstring. Additionally, I added a hacky, experimental feature for controlling the compression level of bundles in 76104a4899ad. As the commit message says, I went with a quick and dirty solution out of time constraints. Furthermore, I wanted to eventually store this configuration in the "bundlespec" so it could be made more flexible. Given: a) bundlespecs are here to stay b) we don't have great documentation over what they are, despite being a user-facing feature c) the list of available compression engines and their behavior isn't exposed d) we need an extensible place to modify behavior of compression engines I want to move forward with formalizing bundlespecs as a user-facing feature. This commit does that by introducing a "bundlespec" help page. Leaning on the just-added compression engine documentation and API, the topic also conveniently lists available compression engines and details about them. This makes features like zstd bundle compression more discoverable. e.g. you can now `hg help -k zstd` and it lists the "bundlespec" topic.
Sat, 01 Apr 2017 13:29:01 -0700 util: document bundle compression
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 13:29:01 -0700] rev 31792
util: document bundle compression An upcoming patch will add support for documenting bundle specifications in more detail. As part of this, we'd like to enumerate available bundle compression formats. In order to do this, we need to provide the help mechanism a dict of names and objects with docstrings. This patch adds docstrings to compengine.bundletype and adds a function for retrieving a dict of them. The code is not yet used.
Sat, 01 Apr 2017 00:21:52 -0700 tests: store ETag when using --headeronly
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 00:21:52 -0700] rev 31791
tests: store ETag when using --headeronly Previously, --headeronly would prevent --twice from working because the ETag wasn't stored when --headeronly was used. This feels like a bug. That feeling is reaffirmed by the fact that this change doesn't regress any tests.
Fri, 31 Mar 2017 21:47:26 -0700 hgweb: extract path traversal checking into standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 31 Mar 2017 21:47:26 -0700] rev 31790
hgweb: extract path traversal checking into standalone function A common exploit in web applications that access paths is to insert path separator strings like ".." to try to get the server to serve up files it shouldn't. We have code for detecting this in staticfile(). A subsequent commit will need to perform this test as well. Since this is security code, let's factor the check so we don't have to reinvent the wheel.
Fri, 31 Mar 2017 22:30:38 -0700 hgweb: use context manager for file I/O
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 31 Mar 2017 22:30:38 -0700] rev 31789
hgweb: use context manager for file I/O
Mon, 03 Apr 2017 10:01:38 -0700 tags: rename "head" to "node" where we don't care
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Apr 2017 10:01:38 -0700] rev 31788
tags: rename "head" to "node" where we don't care Followup to 5eb4d206202b (tags: extract fnode retrieval into its own function, 2017-03-28) in which the "for head in head" became "for head in nodes".
Mon, 03 Apr 2017 08:45:24 -0700 manifest: update comment to be about bytearray
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Apr 2017 08:45:24 -0700] rev 31787
manifest: update comment to be about bytearray Looks like a leftover from 2a18e9e6ca43 (py3: use bytearray() instead of array('c', ...) constructions, 2017-03-12).
(0) -30000 -10000 -3000 -1000 -300 -100 -48 +48 +100 +300 +1000 +3000 +10000 tip