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).
Mon, 03 Apr 2017 11:30:51 -0700 check-code: fix "covert" typo
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Apr 2017 11:30:51 -0700] rev 31786
check-code: fix "covert" typo
Mon, 03 Apr 2017 10:02:55 +0200 hgweb: rename linerangelog.js as followlines.js
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 03 Apr 2017 10:02:55 +0200] rev 31785
hgweb: rename linerangelog.js as followlines.js So that the file name matches both the feature name and user facing vocabulary (e.g. the revset function).
Mon, 03 Apr 2017 09:58:36 +0200 hgweb: rely on a specific class to change cursor type in followlines UI
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 03 Apr 2017 09:58:36 +0200] rev 31784
hgweb: rely on a specific class to change cursor type in followlines UI The previous CSS rule would also apply in pages where followlines UI was not available (e.g. "changeset" view at /rev/<node>/). We insert a "followlines-select" class in JavaScript on actually selectable lines and restrict the CSS selector to use it.
Mon, 03 Apr 2017 09:40:25 +0200 hgweb: use a function expression for the install listener of followlines UI
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 03 Apr 2017 09:40:25 +0200] rev 31783
hgweb: use a function expression for the install listener of followlines UI We define the listener of document's "DOMContentLoaded" inline in registration and use a function expression (anonymous) with everything inside. This makes it clearer that this file is not a library of JavaScript functions but rather an executable script. (Most of changes consists of reindenting the "followlinesBox" function, so mostly white space changes.)
Sun, 02 Apr 2017 12:02:17 +0900 formatter: use templatefilters.json()
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 12:02:17 +0900] rev 31782
formatter: use templatefilters.json() Now _jsonifyobj() is identical to templatefilters.json(paranoid=False).
Sun, 02 Apr 2017 11:54:24 +0900 templatefilters: use list comprehension in json()
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 11:54:24 +0900] rev 31781
templatefilters: use list comprehension in json() Not important, but the code slightly looks better.
Sun, 02 Apr 2017 11:51:25 +0900 templatefilters: unroll handling of None/False/True
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 11:51:25 +0900] rev 31780
templatefilters: unroll handling of None/False/True It doesn't make sense to use a dict here.
Sun, 02 Apr 2017 11:46:49 +0900 templatefilters: drop callable support from json()
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 11:46:49 +0900] rev 31779
templatefilters: drop callable support from json() This backs out ae5447de4c11. A callable should be evaluated beforehand by templater.runsymbol().
Wed, 29 Mar 2017 21:43:38 +0900 ui: use bytes IO and convert EOL manually in ui.editor()
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:43:38 +0900] rev 31778
ui: use bytes IO and convert EOL manually in ui.editor() Text IO sucks on Python 3 as it must be a unicode stream. We could introduce a wrapper that converts unicode back to bytes, but it wouldn't be simple to handle offsets transparently from/to underlying IOBase API. Fortunately, we don't need to process huge text files, so let's stick to bytes IO and convert EOL in memory.
Wed, 29 Mar 2017 21:40:15 +0900 util: add helper to convert between LF and native EOL
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:40:15 +0900] rev 31777
util: add helper to convert between LF and native EOL See the next patch for why.
Wed, 29 Mar 2017 21:28:54 +0900 util: extract pure tolf/tocrlf() functions from eol extension
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:28:54 +0900] rev 31776
util: extract pure tolf/tocrlf() functions from eol extension This can be used for EOL conversion of text files.
Wed, 29 Mar 2017 21:23:28 +0900 pycompat: provide bytes os.linesep
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:23:28 +0900] rev 31775
pycompat: provide bytes os.linesep
Wed, 29 Mar 2017 21:13:55 +0900 pycompat: introduce identity function as a compat stub
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:13:55 +0900] rev 31774
pycompat: introduce identity function as a compat stub I was sometimes too lazy to use 'str' instead of 'lambda a: a'. Let's add a named function for that purpose.
Sun, 02 Apr 2017 02:29:51 -0400 test-blackbox: glob away quoting differences on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 02:29:51 -0400] rev 31773
test-blackbox: glob away quoting differences on Windows Windows uses double quotes in these places.
Sun, 02 Apr 2017 02:24:09 -0400 test-subrepo: update output for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 02:24:09 -0400] rev 31772
test-subrepo: update output for Windows
Sun, 02 Apr 2017 01:51:07 -0400 test-serve: disable unfixable tests on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 01:51:07 -0400] rev 31771
test-serve: disable unfixable tests on Windows These tests would run if hghave.has_serve() were enabled on Windows. Windows has no issue allowing an unpriviledged process to open port 13, so it doesn't abort. The other tests are related to how MSYS tries to be helpful and converts Unix constructs to the Windows equivalent. There isn't any way to disable this behavior, though it supposedly doesn't happen if the exe is linked against the MSYS library.
Sun, 02 Apr 2017 01:28:05 -0400 test-serve: kill daemons before deleting the access and error logs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 01:28:05 -0400] rev 31770
test-serve: kill daemons before deleting the access and error logs On Windows, `rm` will fail with 'Permission denied' if another process has it open. It looks like the rollback test was missing the kill entirely.
Sun, 02 Apr 2017 00:56:52 -0400 test-serve: make the 'listening at *' lines optional
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 00:56:52 -0400] rev 31769
test-serve: make the 'listening at *' lines optional The daemonized serve process doesn't print these lines out (see 448d0c452140). I was able to get it to with the following hack: diff --git a/mercurial/win32.py b/mercurial/win32.py --- a/mercurial/win32.py +++ b/mercurial/win32.py @@ -418,6 +418,11 @@ return str(ppid) def spawndetached(args): + + import subprocess + return subprocess.Popen(args, cwd=pycompat.getcwd(), env=encoding.environ, + creationflags=subprocess.CREATE_NEW_PROCESS_GROUP).pid + # No standard library function really spawns a fully detached # process under win32 because they allocate pipes or other objects # to handle standard streams communications. Passing these objects However, MSYS translates --prefixes starting with '/' to 'C:/MinGW/msys/1.0', which changes the output. The output isn't so important that I want to spend a bunch of time on this, and risk breaking some subtle behavior of `hg serve -d` with the more complicated code.
Sat, 01 Apr 2017 18:30:51 -0400 test-http: update output for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 18:30:51 -0400] rev 31768
test-http: update output for Windows The http test simply wasn't updated in 161ab32b44a1 for Windows. It looks like the https test meant to glob away the error message in 3e2d8120528b, but forgot the '*', and was subsequently removed in 408f2202bd80.
Sat, 01 Apr 2017 15:23:26 -0400 tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 15:23:26 -0400] rev 31767
tests: quote paths in shell script hooks Without the quoting, MSYS will remove the '\' directory separators, and the repo can't be opened.
Sat, 01 Apr 2017 14:48:39 -0400 tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 14:48:39 -0400] rev 31766
tests: add globs for Windows
Fri, 24 Mar 2017 19:19:00 -0700 show: new extension for displaying various repository data
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 24 Mar 2017 19:19:00 -0700] rev 31765
show: new extension for displaying various repository data Currently, Mercurial has a number of commands to show information. And, there are features coming down the pipe that will introduce more commands for showing information. Currently, when introducing a new class of data or a view that we wish to expose to the user, the strategy is to introduce a new command or overload an existing command, sometimes both. For example, there is a desire to formalize the wip/smartlog/underway/mine functionality that many have devised. There is also a desire to introduce a "topics" concept. Others would like views of "the current stack." In the current model, we'd need a new command for wip/smartlog/etc (that behaves a lot like a pre-defined alias of `hg log`). For topics, we'd likely overload `hg topic[s]` to both display and manipulate topics. Adding new commands for every pre-defined query doesn't scale well and pollutes `hg help`. Overloading commands to perform read-only and write operations is arguably an UX anti-pattern: while having all functionality for a given concept in one command is nice, having a single command doing multiple discrete operations is not. Furthermore, a user may be surprised that a command they thought was read-only actually changes something. We discussed this at the Mercurial 4.0 Sprint in Paris and decided that having a single command where we could hang pre-defined views of various data would be a good idea. Having such a command would: * Help prevent an explosion of new query-related commands * Create a clear separation between read and write operations (mitigates footguns) * Avoids overloading the meaning of commands that manipulate data (bookmark, tag, branch, etc) (while we can't take away the existing behavior for BC reasons, we now won't introduce this behavior on new commands) * Allows users to discover informational views more easily by aggregating them in a single location * Lowers the barrier to creating the new views (since the barrier to creating a top-level command is relatively high) So, this commit introduces the `hg show` command via the "show" extension. This command accepts a positional argument of the "view" to show. New views can be registered with a decorator. To prove it works, we implement the "bookmarks" view, which shows a table of bookmarks and their associated nodes. We introduce a new style to hold everything used by `hg show`. For our initial bookmarks view, the output varies from `hg bookmarks`: * Padding is performed in the template itself as opposed to Python * Revision integers are not shown * shortest() is used to display a 5 character node by default (as opposed to static 12 characters) I chose to implement the "bookmarks" view first because it is simple and shouldn't invite too much bikeshedding that detracts from the evaluation of `hg show` itself. But there is an important point to consider: we now have 2 ways to show a list of bookmarks. I'm not a fan of introducing multiple ways to do very similar things. So it might be worth discussing how we wish to tackle this issue for bookmarks, tags, branches, MQ series, etc. I also made the choice of explicitly declaring the default show template not part of the standard BC guarantees. History has shown that we make mistakes and poor choices with output formatting but can't fix these mistakes later because random tools are parsing output and we don't want to break these tools. Optimizing for human consumption is one of my goals for `hg show`. So, by not covering the formatting as part of BC, the barrier to future change is much lower and humans benefit. There are some improvements that can be made to formatting. For example, we don't yet use label() in the templates. We obviously want this for color. But I'm not sure if we should reuse the existing log.* labels or invent new ones. I figure we can punt that to a follow-up. At the aforementioned Sprint, we discussed and discarded various alternatives to `hg show`. We considered making `hg log <view>` perform this behavior. The main reason we can't do this is because a positional argument to `hg log` can be a file path and if there is a conflict between a path name and a view name, behavior is ambiguous. We could have introduced `hg log --view` or similar, but we felt that required too much typing (we don't want to require a command flag to show a view) and wasn't very discoverable. Furthermore, `hg log` is optimized for showing changelog data and there are things that `hg display` could display that aren't changelog centric. There were concerns about using "show" as the command name. Some users already have a "show" alias that is similar to `hg export`. There were also concerns that Git users adapted to `git show` would be confused by `hg show`'s different behavior. The main difference here is `git show` prints an `hg export` like view of the current commit by default and `hg show` requires an argument. `git show` can also display any Git object. `git show` does not support displaying more complex views: just single objects. If we implemented `hg show <hash>` or `hg show <identifier>`, `hg show` would be a superset of `git show`. Although, I'm hesitant to do that at this time because I view `hg show` as a higher-level querying command and there are namespace collisions between valid identifiers and registered views. There is also a prefix collision with `hg showconfig`, which is an alias of `hg config`. We also considered `hg view`, but that is already used by the "hgk" extension. `hg display` was also proposed at one point. It has a prefix collision with `hg diff`. General consensus was "show" or "view" are the best verbs. And since "view" was taken, "show" was chosen. There are a number of inline TODOs in this patch. Some of these represent decisions yet to be made. Others represent features requiring non-trivial complexity. Rather than bloat the patch or invite additional bikeshedding, I figured I'd document future enhancements via TODO so we can get a minimal implmentation landed. Something is better than nothing.
Sun, 02 Apr 2017 18:13:03 -0700 test-revlog-raw: remove duplicated option
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:13:03 -0700] rev 31764
test-revlog-raw: remove duplicated option
Sun, 02 Apr 2017 18:12:47 -0700 test-revlog-raw: fix "genbits" implementation
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:12:47 -0700] rev 31763
test-revlog-raw: fix "genbits" implementation The "genbits" implementation is actually incorrect. This patch fixes it. A good "genbits" implementation should pass the below assertion: n = 3 # or other number l = list(genbits(n)) assert 2**(n*2) == len(set((l[i]<<n)+l[i+1] for i in range(len(l)-1))) An assertion is added to make sure "genbits" won't work unexpectedly.
Wed, 29 Mar 2017 14:49:14 -0700 verify: fix length check
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 14:49:14 -0700] rev 31762
verify: fix length check According to the document added above, we should check L1 == L2, and the only way to get L1 in all cases is to call "rawsize()", and the only way to get L2 is to call "revision(raw=True)". Therefore the fix. Meanwhile there are still a lot of things about flagprocessor broken in revlog.py. Tests will be added after revlog.py gets fixed.
Wed, 29 Mar 2017 14:45:01 -0700 verify: document corner cases
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 14:45:01 -0700] rev 31761
verify: document corner cases It seems a good idea to list all kinds of "surprises" and expected behavior to make the upcoming changes easier to understand. Note: the comment added does not reflect the actual behavior of the current code.
Mon, 03 Apr 2017 17:34:24 -0400 Added signature for changeset ed5b25874d99 stable
Augie Fackler <raf@durin42.com> [Mon, 03 Apr 2017 17:34:24 -0400] rev 31760
Added signature for changeset ed5b25874d99
Mon, 03 Apr 2017 17:34:22 -0400 Added tag 4.1.2 for changeset ed5b25874d99 stable
Augie Fackler <raf@durin42.com> [Mon, 03 Apr 2017 17:34:22 -0400] rev 31759
Added tag 4.1.2 for changeset ed5b25874d99
Wed, 29 Mar 2017 22:26:16 +0200 hgweb: expose a followlines UI in filerevision view
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 22:26:16 +0200] rev 31758
hgweb: expose a followlines UI in filerevision view In filerevision view (/file/<rev>/<fname>) we add some event listeners on mouse clicks of <span> elements in the <pre class="sourcelines"> block. Those listeners will capture a range of lines selected between two mouse clicks and a box inviting to follow the history of selected lines will then show up. Selected lines (i.e. the block of lines) get a CSS class which make them highlighted. Selection can be cancelled (and restarted) by either clicking on the cancel ("x") button in the invite box or clicking on any other source line. Also clicking twice on the same line will abort the selection and reset event listeners to restart the process. As a first step, this action is only advertised by the "cursor: cell" CSS rule on source lines elements as any other mechanisms would make the code significantly more complicated. This might be improved later. All JavaScript code lives in a new "linerangelog.js" file, sourced in filerevision template (only in "paper" style for now).
Wed, 29 Mar 2017 05:31:31 -0700 shelve: move ui.quiet manipulations to configoverride
Kostia Balytskyi <ikostia@fb.com> [Wed, 29 Mar 2017 05:31:31 -0700] rev 31757
shelve: move ui.quiet manipulations to configoverride
Thu, 30 Mar 2017 21:21:15 -0700 revlog: add a fast path for revision(raw=False)
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 21:21:15 -0700] rev 31756
revlog: add a fast path for revision(raw=False) If cache hit and flags are empty, no flag processor runs and "text" equals to "rawtext". So we check flags, and return rawtext. This resolves performance issue introduced by a previous patch.
Thu, 30 Mar 2017 18:38:03 -0700 revlog: make _addrevision only accept rawtext
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 18:38:03 -0700] rev 31755
revlog: make _addrevision only accept rawtext All 3 users of _addrevision use raw: - addrevision: passing rawtext to _addrevision - addgroup: passing rawtext and raw=True to _addrevision - clone: passing rawtext to _addrevision There is no real user using _addrevision(raw=False). On the other hand, _addrevision is low-level code dealing with raw revlog deltas and rawtexts. It should not transform rawtext to non-raw text. This patch removes the "raw" parameter from "_addrevision", and does some rename and doc change to make it clear that "_addrevision" expects rawtext. Archeology shows 2df983125d37 added "raw" flag to "_addrevision", follow-ups e12c0fa1f65b and c1b7b2285522 seem to make the flag unnecessary. test-revlog-raw.py no longer complains.
Thu, 30 Mar 2017 18:24:23 -0700 revlog: use raw revisions in clone
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 18:24:23 -0700] rev 31754
revlog: use raw revisions in clone test-revlog-raw.py now shows "clone test passed", but there is more to fix.
Thu, 30 Mar 2017 18:23:27 -0700 revlog: use raw revisions in revdiff
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 18:23:27 -0700] rev 31753
revlog: use raw revisions in revdiff See the added comment. revdiff is meant to output the raw delta that will be written to revlog. It should use raw. test-revlog-raw.py now shows "addgroupcopy test passed", but there is more to fix.
Thu, 30 Mar 2017 17:58:03 -0700 revlog: use raw content when building delta
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 17:58:03 -0700] rev 31752
revlog: use raw content when building delta Using external content provided by flagprocessor when building revlog delta is wrong, because deltas are applied to raw contents in revlog. This patch fixes the above issue by adding "raw=True". test-revlog-raw.py now shows "local test passed", but there is more to fix.
Thu, 30 Mar 2017 15:34:08 -0700 revlog: fix _cache usage in revision()
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 15:34:08 -0700] rev 31751
revlog: fix _cache usage in revision() As documented at revlog.__init__, revlog._cache stores raw text. The current read and write usage of "_cache" in revlog.revision lacks of raw=True check. This patch fixes that by adding check about raw, and storing rawtext explicitly in _cache. Note: it may slow down cache hit code path when raw=False and flags=0. That performance issue will be fixed in a later patch. test-revlog-raw now points us to a new problem.
Thu, 30 Mar 2017 14:56:09 -0700 revlog: rename some "text"s to "rawtext"
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 14:56:09 -0700] rev 31750
revlog: rename some "text"s to "rawtext" This makes code easier to understand. "_addrevision" is left untouched - it will be changed in a later patch.
Thu, 30 Mar 2017 07:59:48 -0700 revlog: clarify flagprocessor documentation
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 07:59:48 -0700] rev 31749
revlog: clarify flagprocessor documentation The words "text", "newtext", "bool" could be confusing. Use explicit "text" or "rawtext" and document more about the "bool".
Thu, 30 Mar 2017 20:48:57 -0700 revlog: add a stronger test for raw processing
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 20:48:57 -0700] rev 31748
revlog: add a stronger test for raw processing There are some issues about revlog raw processing (flag processor). The test is relatively strong covering many cases. It will verify fixes.
Fri, 31 Mar 2017 11:53:56 +0200 hook: add hook name information to external hook
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:53:56 +0200] rev 31747
hook: add hook name information to external hook While we are here, we can also add the hook name information to external hook.
Fri, 31 Mar 2017 11:08:11 +0200 hook: provide hook type information to external hook
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:08:11 +0200] rev 31746
hook: provide hook type information to external hook The python hooks have access to the hook type information. There is not reason for external hook to not be aware of it too. For the record my use case is to make sure a hook script is configured for the right type.
Fri, 31 Mar 2017 11:06:42 +0200 hook: use 'htype' in 'hook'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:06:42 +0200] rev 31745
hook: use 'htype' in 'hook' Same rational as for 'runhooks', we fix the naming in another function.
Fri, 31 Mar 2017 11:03:23 +0200 hook: use 'htype' in 'runhooks'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:03:23 +0200] rev 31744
hook: use 'htype' in 'runhooks' Same rational as for '_pythonhook', 'htype' is more accurate and less error prone. We just fixed an error from the 'name'/'hname' confusion and this should prevent them in the future.
Fri, 31 Mar 2017 11:02:05 +0200 hook: fix name used in untrusted message
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:02:05 +0200] rev 31743
hook: fix name used in untrusted message The name used in the message we issue when a hook is untrusted was using "name" which is actually the hook type and not the name of the hook.
Fri, 31 Mar 2017 10:59:37 +0200 hook: use "htype" as variable name in _pythonhook
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 10:59:37 +0200] rev 31742
hook: use "htype" as variable name in _pythonhook We rename 'name' to 'htype' because it fits the variable content better. Multiple python hooks already use 'htype' as a name for the argument. This makes the difference with "hname" clearer and the code less error prone.
Thu, 30 Mar 2017 17:29:03 +0200 run-tests: auto-replace 'TXNID' output
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 30 Mar 2017 17:29:03 +0200] rev 31741
run-tests: auto-replace 'TXNID' output Hooks related to the transaction are aware of the transaction id. By definition this txn-id is unique and different for each transaction. As a result it can never be predicted in test and always needs matching. As a result, touching any like with this data is annoying. We solve the problem once and for all by installing an automatic replacement. In test, this will now show as: TXNID=TXN:$ID$
Sat, 01 Apr 2017 02:32:49 +0900 largefiles: use readasstandin() to read hex hash directly from filectx
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:49 +0900] rev 31740
largefiles: use readasstandin() to read hex hash directly from filectx BTW, C implementation of hexdigest() for SHA-1/256/512 returns hex hash in lower case, and doctest in Python standard hashlib assumes that, too. But it isn't explicitly described in API document or so. Therefore, we can't assume that hexdigest() always returns hex hash in lower case, for any hash algorithms, on any Python runtimes and versions. From point of view of that, it is reasonable for portability that 40800668e019 applies lower() on hex hash in overridefilemerge(). But on the other hand, in largefiles extension, there are still many code paths comparing between hex hashes or storing hex hash into standin file, without lower(). Switching to hash algorithm other than SHA-1 may be good chance to clarify our policy about hexdigest()-ed hash value string. - assume that hexdigest() always returns hex hash in lower case, or - apply lower() on hex hash in appropriate layers to ensure lower-case-ness of it for portability
Sat, 01 Apr 2017 02:32:49 +0900 largefiles: remove unused readstandin()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:49 +0900] rev 31739
largefiles: remove unused readstandin() Now, there is no client of readstandin().
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: make copytostore() accept only changectx as the 2nd argument (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31738
largefiles: make copytostore() accept only changectx as the 2nd argument (API) As the name describes, the 2nd argument 'revorctx' of copytostore() can accept non-changectx value, for historical reason, But, since 10561eb97c7f, copyalltostore(), the only one copytostore() client in Mercurial source tree, always passes changectx as 'revorctx'. Therefore, it is reasonable to make copytostore() accept only changectx as the 2nd argument, now.
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: remove unused keyword argument of copytostore() (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31737
largefiles: remove unused keyword argument of copytostore() (API) AFAIK, 'uploaded' argument of copytostore() (or copytocache(), before renaming at c65f5b6e26d4) has been never used both on caller and callee sides, since official release of bundled largefiles extension.
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: add copytostore() fstandin argument to replace readstandin() (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31736
largefiles: add copytostore() fstandin argument to replace readstandin() (API) copyalltostore(), only one caller of copytostore(), already knows standin file name of the target largefile. Therefore, passing it to copytostore() is more efficient than calculating it in copytostore() or readstandin().
Sat, 01 Apr 2017 02:32:47 +0900 largefiles: replace readstandin() by readasstandin()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:47 +0900] rev 31735
largefiles: replace readstandin() by readasstandin() These code paths already (or should, for efficiency at repetition) know the target changectx and path of standin file.
Sat, 01 Apr 2017 02:32:31 +0900 largefiles: introduce readasstandin() to read hex hash from given filectx
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:31 +0900] rev 31734
largefiles: introduce readasstandin() to read hex hash from given filectx This will be used to centralize and encapsulate the logic to read hash from given (filectx of) standin file. readstandin() isn't suitable for this purpose, because there are some code paths, which want to read hex hash directly from filectx.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: abort hg pull --rebase if rebase.requiredest is set (issue5514)
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31733
rebase: abort hg pull --rebase if rebase.requiredest is set (issue5514) Previously, the pull would succeed, but the subsequent rebase would fail due to the rebase.requiredest flag. Now abort earlier with a more useful error message.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: demonstrate behavior with requiredest and pull --rebase
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31732
rebase: demonstrate behavior with requiredest and pull --rebase
Thu, 30 Mar 2017 03:50:10 -0700 rebase: allow destination-free continue and abort (issue5513)
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31731
rebase: allow destination-free continue and abort (issue5513)
Thu, 30 Mar 2017 03:50:10 -0700 rebase: test to show brokenness with requiredest
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31730
rebase: test to show brokenness with requiredest As shown in issue5513, --continue is broken when destination is required. This adds a patch that demonstates this silly behavior, which will be fixed in a future patch.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: move destination test to new test file
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31729
rebase: move destination test to new test file We'll be adding a lot more tests here, so it makes sense to have this in its own file now.
Sat, 01 Apr 2017 00:21:17 -0400 templatefilter: add support for 'long' to json()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 00:21:17 -0400] rev 31728
templatefilter: add support for 'long' to json() When disabling the '#requires serve' check in test-hgwebdir.t and running it on Windows, several 500 errors popped up when querying '?style=json', with the following in the error log: File "...\\mercurial\\templater.py", line 393, in runfilter "keyword '%s'") % (filt.func_name, dt)) Abort: template filter 'json' is not compatible with keyword 'lastchange' The swallowed exception at that point was: File "...\\mercurial\\templatefilters.py", line 242, in json raise TypeError('cannot encode type %s' % obj.__class__.__name__) TypeError: cannot encode type long This corresponds to 'lastchange' being populated by hgweb.common.get_stat(), which uses os.stat().st_mtime. os.stat_float_times() is being disabled in util, so the type for the times is 'long' on Windows, and 'int' on Linux.
Thu, 30 Mar 2017 21:40:10 +0200 hgweb: prefix line id by ctx shortnode in filelog when patches are shown
Denis Laxalde <denis@laxalde.org> [Thu, 30 Mar 2017 21:40:10 +0200] rev 31727
hgweb: prefix line id by ctx shortnode in filelog when patches are shown When "patch" query parameter is present in requests to filelog view, line ids in patches diff are no longer unique in the page since several patches are shown on the same page. We now prefix line id by changeset shortnode when several patches are displayed in the same page to have unique line ids overall.
Wed, 29 Mar 2017 12:14:20 -0700 test-check-code: prevent files being added to the root directory
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:14:20 -0700] rev 31726
test-check-code: prevent files being added to the root directory Adding new files in the root directory is probably a mistake, and is usually discouraged [1]. The test catches it to avoid mistakes like [2]. Modify the test if files need to be added in the root. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-July/086442.html [2]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095836.html
Wed, 29 Mar 2017 09:54:34 -0400 sslutil: clarify internal documentation
Matt Harbison <matt_harbison@yahoo.com> [Wed, 29 Mar 2017 09:54:34 -0400] rev 31725
sslutil: clarify internal documentation I ran into this python issue with an incomplete certificate chain on Windows recently, and this is the clarification that came from that experimenting. The comment I left on the bug tracker [1] with a reference to the CPython code [2] indicates that the original problem I had is a different bug, but happened to be mentioned under issue20916 on the Python bug tracker. [1] https://bz.mercurial-scm.org/show_bug.cgi?id=5313#c7 [2] https://hg.python.org/cpython/file/v2.7.12/Modules/_ssl.c#l628
Wed, 29 Mar 2017 16:28:51 -0700 unionrepo: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:28:51 -0700] rev 31724
unionrepo: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:28:00 -0700 bundlerepo: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:28:00 -0700] rev 31723
bundlerepo: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:23:04 -0700 revlog: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:23:04 -0700] rev 31722
revlog: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:46:57 -0700 check-code: detect r.revision(r.node(rev))
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:46:57 -0700] rev 31721
check-code: detect r.revision(r.node(rev)) revlog.revision takes either node or rev, but taking a rev is more efficient, because converting rev to node is just a seek and read. That's cheaper than converting node to rev, which may require O(n) walk in revlog index for the first times, and then triggering building the radix tree index. Even with the radix tree built, rev -> node is still faster than node -> rev because the radix tree requires more jumps in memory. So r.revision(r.node(rev)) should be changed to r.revision(rev). This patch adds a check-code rule to detect that.
Wed, 29 Mar 2017 12:37:03 -0700 hardlink: check directory's st_dev when copying files
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:37:03 -0700] rev 31720
hardlink: check directory's st_dev when copying files Previously, when copying a file, copyfiles will compare src's st_dev with dirname(dst)'s st_dev, to decide whether to enable hardlink or not. That could have issues on Linux's overlayfs, where stating directories could result in different st_dev from st_dev of stating files, even if both the directories and the files exist in the overlay's upperdir. This patch fixes it by checking dirname(src) instead. It's more consistent because we are checking directories for both src and dest. That fixes test-hardlinks.t running on common Docker setups.
Wed, 29 Mar 2017 12:26:46 -0700 hardlink: duplicate hardlink detection for copying files and directories
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:26:46 -0700] rev 31719
hardlink: duplicate hardlink detection for copying files and directories A later patch will change one of them so they diverge.
Wed, 29 Mar 2017 12:21:15 -0700 hardlink: extract topic text logic of copyfiles
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:21:15 -0700] rev 31718
hardlink: extract topic text logic of copyfiles The topic text shows whether it's "linking" or "copying", based on "hardlink" value. The function is extracted so a later patch can reuse it.
Wed, 29 Mar 2017 14:56:58 +0530 tests: add check to make sure summary works on Python 2
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Mar 2017 14:56:58 +0530] rev 31717
tests: add check to make sure summary works on Python 2
Wed, 29 Mar 2017 14:47:52 +0530 color: replace str() with pycompat.bytestr()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Mar 2017 14:47:52 +0530] rev 31716
color: replace str() with pycompat.bytestr()
Sun, 26 Mar 2017 20:52:51 +0530 diff: slice over bytes to make sure conditions work normally
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 26 Mar 2017 20:52:51 +0530] rev 31715
diff: slice over bytes to make sure conditions work normally Both of this are part of generating `hg diff` on python 3.
Wed, 29 Mar 2017 20:19:26 -0700 minirst: remove redundant _admonitions set
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 20:19:26 -0700] rev 31714
minirst: remove redundant _admonitions set As Yuya pointed out during a review a month ago, _admonitions and _admonitiontitles are largely redundant. With the last commit, they are exactly redundant. So, remove _admonitions and use _admonitiontitles.keys() instead.
Wed, 29 Mar 2017 20:05:18 -0700 minirst: remove "admonition" from _admonitions
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 20:05:18 -0700] rev 31713
minirst: remove "admonition" from _admonitions The "admonition" rst primitive is split into "specific" admonitions ("attention," "caution," etc) and the "generic" admonition ("admonition"). For more, see http://docutils.sourceforge.net/docs/ref/rst/directives.html#admonitions The _admonitions set and keys of the _admonitiontitles dict overlap exactly except _admonitions has an "admonition" entry. Nowhere in Mercurial is the "admonition" admonition directive used. Even if it were, it doesn't have a title, so it wouldn't be rendered correctly. So, let's remove "admonition" from the set of recognized admonition directives.
Wed, 29 Mar 2017 19:59:47 -0700 minirst: reindent _admonitiontitles
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 19:59:47 -0700] rev 31712
minirst: reindent _admonitiontitles I don't like the verical indent. While I was here, I cleaned up some whitespace and added a trailing comma on the last element.
Tue, 28 Mar 2017 06:23:28 +0200 tags: extract filenode filtering into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:23:28 +0200] rev 31711
tags: extract filenode filtering into its own function We'll also need to reuse this logic so we extract it into its own function. We document some of the logic in the process.
Tue, 28 Mar 2017 06:08:12 +0200 tags: extract tags computation from fnodes into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:08:12 +0200] rev 31710
tags: extract tags computation from fnodes into its own function I'm about to introduce code that needs to perform such computation on "arbitrary" nodes. The logic is extracted into its own function for reuse.
Tue, 28 Mar 2017 07:41:23 +0200 tags: only return 'alltags' in 'findglobaltags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:41:23 +0200] rev 31709
tags: only return 'alltags' in 'findglobaltags' This is minor update along the way. We simplify the 'findglobaltags' function to only return the tags. Since no existing data is reused, we know that all tags returned are global and we can let the caller get that information if it cares about it.
Tue, 28 Mar 2017 07:39:10 +0200 tags: make argument 'tagtype' optional in '_updatetags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:39:10 +0200] rev 31708
tags: make argument 'tagtype' optional in '_updatetags' This is the next step from the previous changesets, we are now ready to use this function in a simpler way.
Tue, 28 Mar 2017 07:38:10 +0200 tags: reorder argument of '_updatetags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:38:10 +0200] rev 31707
tags: reorder argument of '_updatetags' We move all arguments related to tagtype to the end, together. This will allow us to make these arguments optional and reuse of this logic for callers that do not care about the tag types.
Tue, 28 Mar 2017 06:13:49 +0200 tags: do not feed dictionaries to 'findglobaltags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:13:49 +0200] rev 31706
tags: do not feed dictionaries to 'findglobaltags' The code asserts that these dictionary are empty. So we can be more explicit and have the function return the dictionaries directly.
Tue, 28 Mar 2017 06:01:31 +0200 tags: extract fnode retrieval into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:01:31 +0200] rev 31705
tags: extract fnode retrieval into its own function My main goal here is to be able to reuse this logic easily. As a side effect this important logic is now insulated and the code is clearer.
Wed, 29 Mar 2017 12:07:07 +0200 hgweb: fix diff hunks filtering by line range in webutil.diffs()
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 12:07:07 +0200] rev 31704
hgweb: fix diff hunks filtering by line range in webutil.diffs() The previous clause for filter out a diff hunk was too restrictive. We need to consider the following cases (assuming linerange=(lb, ub) and the @s2,l2 hunkrange): <-(s2)--------(s2+l2)-> <-(lb)---(ub)-> <-(lb)---(ub)-> <-(lb)---(ub)-> previously on the first and last situations were considered. In test-hgweb-filelog.t, add a couple of lines at the beginning of file "b" so that the line range we will follow does not start at the beginning of file. This covers the change in aforementioned diff hunk filter clause.
Sat, 25 Mar 2017 11:30:08 +0100 summary: display obsolete state of parents
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 11:30:08 +0100] rev 31703
summary: display obsolete state of parents Extend the "parent: " lines in summary to display "(obsolete)" when the parent is obsolete.
Sat, 25 Mar 2017 10:40:29 +0100 templates: add "changeset.obsolete" label in command line style
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 10:40:29 +0100] rev 31702
templates: add "changeset.obsolete" label in command line style Following respective change in cmdutil.changeset_printer.
Tue, 28 Mar 2017 22:38:45 +0200 templates: shorten definition of changeset labels in command-line style
Denis Laxalde <denis@laxalde.org> [Tue, 28 Mar 2017 22:38:45 +0200] rev 31701
templates: shorten definition of changeset labels in command-line style We'll add more labels and the line is already quite long, so let's define a variable to hold all evolution "troubles" labels.
Tue, 28 Mar 2017 22:36:22 +0200 templates: use separate() to build changeset labels in command-line style
Denis Laxalde <denis@laxalde.org> [Tue, 28 Mar 2017 22:36:22 +0200] rev 31700
templates: use separate() to build changeset labels in command-line style
Sat, 25 Mar 2017 10:34:11 +0100 templatekw: add an "obsolete" keyword
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 10:34:11 +0100] rev 31699
templatekw: add an "obsolete" keyword Definition is the same as the one in evolve extension.
Sat, 25 Mar 2017 09:39:07 +0100 cmdutil: add a "changeset.obsolete" label in changeset_printer
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 09:39:07 +0100] rev 31698
cmdutil: add a "changeset.obsolete" label in changeset_printer Until now there were no label to highlight obsolete changesets in log output, only evolution troubles (unstable, bumped, divergent) are supported. We add a "changeset.obsolete" label on changeset entries produced by changeset_printer so that obsolete changesets can be highlighted in log output. This is useful because, unless using a graph log where obsolete changesets have a 'x' marker, there's no way to identify obsolete changesets. And even in graph mode, when working directory's parent is obsolete, we get a '@' marker and we do not see it as obsolete.
Tue, 28 Mar 2017 14:40:13 -0700 fileset: perform membership test against set for status queries
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Mar 2017 14:40:13 -0700] rev 31697
fileset: perform membership test against set for status queries Previously, fileset functions operating on status items performed membership tests against a list of items. When there are thousands of items having a specific status, that test can be extremely slow. Changing the membership test to a set makes this operation substantially faster. On the mozilla-central repo: $ hg files -r d14cac631ecc 'set:added()' before: 28.120s after: 0.860s $ hg status --change d14cac631ecc --added 0.690s
Tue, 28 Mar 2017 10:21:38 -0700 worker: flush ui buffers before running the worker
David Soria Parra <davidsp@fb.com> [Tue, 28 Mar 2017 10:21:38 -0700] rev 31696
worker: flush ui buffers before running the worker a91c6275 introduces flushing ui buffers after a worker finished. If the ui was not flushed before the worker was started, fork will copy the existing buffers to the worker. This causes messages issued before the worker started to be written to the terminal for each worker. We are now flushing the ui before we start a worker and add an appropriate test which will fail before this patch.
Tue, 28 Mar 2017 08:40:12 -0700 chgserver: do not copy configs set by environment variables
Jun Wu <quark@fb.com> [Tue, 28 Mar 2017 08:40:12 -0700] rev 31695
chgserver: do not copy configs set by environment variables Config set by environment variables have a source like "$ENVNAME". They should not be copied because they will be recalculated by rcutil.rccomponents.
Tue, 28 Mar 2017 07:57:56 -0700 rcutil: extract duplicated logic to a lambda
Jun Wu <quark@fb.com> [Tue, 28 Mar 2017 07:57:56 -0700] rev 31694
rcutil: extract duplicated logic to a lambda This simplifies the code a bit.
Tue, 28 Mar 2017 07:55:32 -0700 rcutil: unindent a block
Jun Wu <quark@fb.com> [Tue, 28 Mar 2017 07:55:32 -0700] rev 31693
rcutil: unindent a block Since global _rccomponents is gone, the code could be simplified.
Tue, 28 Mar 2017 07:54:00 -0700 rcutil: do not cache rccomponents
Jun Wu <quark@fb.com> [Tue, 28 Mar 2017 07:54:00 -0700] rev 31692
rcutil: do not cache rccomponents The function is only called once except for "hg debugconfig", where it is called twice. So there is no need to cache it. Caching it will cause issues with chgserver. Instead of dropping the cache in chgserver, it seems cleaner to just avoid the cache.
Sat, 25 Mar 2017 19:17:11 -0400 ui: rerun color.setup() once the pager has spawned to honor 'color.pagermode'
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Mar 2017 19:17:11 -0400] rev 31691
ui: rerun color.setup() once the pager has spawned to honor 'color.pagermode' Otherwise, ui.pageractive is False when color is setup in dispatch.py (without --pager=on), and this config option is ignored.
Sat, 25 Mar 2017 21:12:00 -0400 ui: defer setting pager related properties until the pager has spawned
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Mar 2017 21:12:00 -0400] rev 31690
ui: defer setting pager related properties until the pager has spawned When --pager=on is given, dispatch.py spawns a pager before setting up color. If the pager failed to launch, ui.pageractive was left set to True, so color configured itself based on 'color.pagermode'. A typical MSYS setting would be 'color.mode=auto, color.pagermode=ansi'. In the failure case, this would print a warning, disable the pager, and then print the raw ANSI codes to the terminal. Care needs to be taken, because it appears that leaving ui.pageractive=True was the only thing that prevented an attempt at running the pager again from inside the command. This results in a double warning message, so pager is simply disabled on failure. The ui config settings didn't need to be moved to fix this, but it seemed like the right thing to do for consistency.
Sat, 25 Mar 2017 13:50:17 -0400 color: stop mutating the default effects map
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Mar 2017 13:50:17 -0400] rev 31689
color: stop mutating the default effects map A future change will make color.setup() callable a second time when the pager is spawned, in order to honor the 'color.pagermode' setting. The problem was that when 'color.mode=auto' was resolved to 'win32' in the first pass, the default ANSI effects were overwritten, making it impossible to honor 'pagermode=ansi'. Also, the two separate maps didn't have the same keys. The symmetric difference is 'dim' and 'italic' (from ANSI), and 'bold_background' (from win32). Thus, the update left entries that didn't belong for the current mode. This bled through `hg debugcolor`, where the unsupported ANSI keys were listed in 'win32' mode. As an added bonus, this now correctly enables color with MSYS `less` for a command like this, where pager is forced on: $ hg log --config color.pagermode=ansi --pager=yes --color=auto Previously, the output was corrupted. The raw output, as seen through the ANSI blind `more.com` was: <-[-1;6mchangeset: 34840:3580d1197af9<-[-1m ... which MSYS `less -FRX` rendered as: 1;6mchangeset: 34840:3580d1197af91m ... (The two '<-' instances were actually an arrow character that TortoiseHg warned couldn't be encoded, and notepad++ translated to a single '?'.) Returning an empty map for 'ui._colormode == None' seems better that defaulting to '_effects' (since some keys are mode dependent), and is better than None, which blows up `hg debugcolor --color=never`.
Sun, 26 Mar 2017 21:43:47 -0700 pager: do not read from environment variable
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:43:47 -0700] rev 31688
pager: do not read from environment variable $PAGER is converted to the pager.pager config item. So it's no longer necessary to read $PAGER in ui.pager().
Sun, 26 Mar 2017 21:41:42 -0700 ui: simplify geteditor
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:41:42 -0700] rev 31687
ui: simplify geteditor Now $EDITOR and $VISUAL will affect ui.editor directly. So it's no longer necessary to test them in ui.geteditor.
Sun, 26 Mar 2017 21:40:22 -0700 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:40:22 -0700] rev 31686
debugconfig: list environment variables in debug output Since we print "read config from" for config files, printing environment variables will make it more consistent.
Sun, 26 Mar 2017 21:33:37 -0700 rcutil: let environ override system configs (BC)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:33:37 -0700] rev 31685
rcutil: let environ override system configs (BC) This is BC because system configs won't be able to override $EDITOR, $PAGER. The new behavior is arguably more rational.
Sun, 26 Mar 2017 21:27:02 -0700 rcutil: add a method to convert environment variables to config items
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:27:02 -0700] rev 31684
rcutil: add a method to convert environment variables to config items Handling config and environ priorities has been messy. Partially because we don't have config layers - you either get all configs (sys + user), or none. Ideally, environ like $EDITOR, $PAGER should be able to override the system configs "ui.editor", "pager.pager". This patch provides the ability to convert them into config items, so they can be inserted into the middle config layer between system rc and user rc.
Sun, 26 Mar 2017 21:04:29 -0700 rcutil: let rccomponents return different types of configs (API)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:04:29 -0700] rev 31683
rcutil: let rccomponents return different types of configs (API) The next patches will convert environ to raw config items, and insert the config items between systemrcpath and userrcpath. This patch teaches rccomponents to return the type information so the caller could distinguish between "path" and raw config "items".
Sun, 26 Mar 2017 20:48:00 -0700 rcutil: rename rcpath to rccomponents (API)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:48:00 -0700] rev 31682
rcutil: rename rcpath to rccomponents (API)
Sun, 26 Mar 2017 20:46:05 -0700 rcutil: extract rc directory listing logic
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:46:05 -0700] rev 31681
rcutil: extract rc directory listing logic The logic of listing a ".rc" directory is duplicated in two functions, extract it to a single function to make the code cleaner.
Sun, 26 Mar 2017 20:21:32 -0700 rcutil: split osrcpath to return default.d paths (API)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:21:32 -0700] rev 31680
rcutil: split osrcpath to return default.d paths (API) After this change, there are 3 rcpath functions: - defaultrcpath - systemrcpath - userrcpath This will allow us to insert another config layer in the middle.
Sun, 26 Mar 2017 20:18:42 -0700 rcutil: move scmutil.*rcpath to rcutil (API)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:18:42 -0700] rev 31679
rcutil: move scmutil.*rcpath to rcutil (API) As discussed at [1], the logic around "actual config"s seem to be non-trivial enough that it's worth a new module. This patch creates the module and move "scmutil.*rcpath" functions there as the first step. More methods will be moved to the module in the future. The module is different from config.py because the latter only cares about data structure and parsing, and does not care about special case, or system config paths, or environment variables. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095503.html
Sat, 25 Mar 2017 17:25:23 +0900 statfs: make getfstype() raise OSError
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 17:25:23 +0900] rev 31678
statfs: make getfstype() raise OSError It's better for getfstype() function to not suppress an error. Callers can handle it as necessary. Now "hg debugfsinfo" will report OSError.
Sat, 25 Mar 2017 17:24:11 +0900 statfs: rename pygetfstype to getfstype
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 17:24:11 +0900] rev 31677
statfs: rename pygetfstype to getfstype There's no ambiguity now.
Sat, 25 Mar 2017 17:23:21 +0900 statfs: refactor inner function as a mapping from statfs to string
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 17:23:21 +0900] rev 31676
statfs: refactor inner function as a mapping from statfs to string The major difference between BSD and Linux is how to get a fstype string. Let's split the longest part of getfstype() as a pure function.
Sat, 25 Mar 2017 17:13:12 +0900 statfs: simplify handling of return value
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 17:13:12 +0900] rev 31675
statfs: simplify handling of return value Py_BuildValue() can translate NULL pointer to None.
Sat, 25 Mar 2017 18:22:27 +0900 hghave: use util.getfstype
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 18:22:27 +0900] rev 31674
hghave: use util.getfstype
Sun, 26 Mar 2017 19:57:17 -0700 runtests: change local IP glob pattern from "127.0.0.1" to "$LOCALIP"
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 19:57:17 -0700] rev 31673
runtests: change local IP glob pattern from "127.0.0.1" to "$LOCALIP" This is similar to what 348b2b9da703 does. Since 636cf3f7620d has changed "127.0.0.1" to "$LOCALIP". The glob pattern needs update accordingly. It is expected to fix tests running in some BSD jails.
Mon, 27 Mar 2017 16:00:47 +0200 tags: deprecated 'repo.tag'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 16:00:47 +0200] rev 31672
tags: deprecated 'repo.tag' All user are gone. We can now celebrate the removal of some extra line from the 'localrepo' class.
Mon, 27 Mar 2017 18:08:05 +0200 drawdag: use 'tagsmod.tag' instead of 'repo.tag'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 18:08:05 +0200] rev 31671
drawdag: use 'tagsmod.tag' instead of 'repo.tag' The former is about to be deprecated.
Mon, 27 Mar 2017 16:00:34 +0200 tags: use the 'tag' function from the 'tags' module in the 'tag' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 16:00:34 +0200] rev 31670
tags: use the 'tag' function from the 'tags' module in the 'tag' command There is No need to go through the 'repo' object method anymore.
Mon, 27 Mar 2017 15:58:31 +0200 tags: move 'repo.tag' in the 'tags' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 15:58:31 +0200] rev 31669
tags: move 'repo.tag' in the 'tags' module Similar logic, pretty much nobody use this method (that creates a tag) so we move it into the 'tags' module were it belong.
Mon, 27 Mar 2017 15:55:07 +0200 tags: move '_tags' from 'repo' to 'tags' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 15:55:07 +0200] rev 31668
tags: move '_tags' from 'repo' to 'tags' module As far as I understand, that function do not needs to be on the local repository class, so we extract it in the 'tags' module were it will be nice and comfortable. We keep the '_' in the name since its only user will follow in the next changeset.
Mon, 13 Mar 2017 15:17:20 +0100 hgweb: filter diff hunks when 'linerange' and 'patch' are specified in filelog
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 13 Mar 2017 15:17:20 +0100] rev 31667
hgweb: filter diff hunks when 'linerange' and 'patch' are specified in filelog
Mon, 13 Mar 2017 15:15:49 +0100 hgweb: add a 'linerange' parameter to webutil.diffs()
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 13 Mar 2017 15:15:49 +0100] rev 31666
hgweb: add a 'linerange' parameter to webutil.diffs() This is used to filter out hunks based on their range (with respect to 'node2' for patch.diffhunks() call, i.e. 'ctx' for webutil.diffs()). This is the simplest way to filter diff hunks, here done on server side. Later on, it might be interesting to perform this filtering on client side and expose a "toggle" action to alternate between full and filtered diff.
Thu, 19 Jan 2017 17:41:00 +0100 hgweb: handle a "linerange" request parameter in filelog command
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 19 Jan 2017 17:41:00 +0100] rev 31665
hgweb: handle a "linerange" request parameter in filelog command We now handle a "linerange" URL query parameter to filter filelog using a logic similar to followlines() revset. The URL syntax is: log/<rev>/<file>?linerange=<fromline>:<toline> As a result, filelog entries only consists of revision changing specified line range. The linerange information is propagated to "more"/"less" navigation links but not to numeric navigation links as this would apparently require a dedicated "revnav" class. Only update the "paper" template in this patch.
Sun, 26 Mar 2017 16:51:19 -0700 shelve: add logic to preserve active bookmarks
Kostia Balytskyi <ikostia@fb.com> [Sun, 26 Mar 2017 16:51:19 -0700] rev 31664
shelve: add logic to preserve active bookmarks This adds an explicit active-bookmark-handling logic to shelve. Traditional shelve handles it by transaction aborts, but it is a bit ugly and having an explicit functionality seems better.
Sun, 26 Mar 2017 12:26:35 -0700 metadataonlyctx: speed up sanity check
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 12:26:35 -0700] rev 31663
metadataonlyctx: speed up sanity check Previously the sanity check will construct manifestctx for both p1 and p2. But it only needs the "manifest node" information, which could be read from changelog directly.
Fri, 24 Feb 2017 18:39:08 +0100 revset: factor out linerange processing into a utility function
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Feb 2017 18:39:08 +0100] rev 31662
revset: factor out linerange processing into a utility function Similar processing will be done in hgweb.webutil in forthcoming changeset.
Mon, 13 Mar 2017 10:41:13 +0100 hgweb: add a "patch" query parameter to filelog command
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 13 Mar 2017 10:41:13 +0100] rev 31661
hgweb: add a "patch" query parameter to filelog command Add support for a "patch" query parameter in filelog web command similar to --patch option of `hg log` to display the diff of each changeset in the table of revisions. The diff text is displayed in a dedicated row of the table that follows the existing one for each entry and spans over all columns. Only update "paper" template in this patch.
Mon, 13 Mar 2017 10:40:19 +0100 hgweb: handle "parity" internally in webutil.diffs()
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 13 Mar 2017 10:40:19 +0100] rev 31660
hgweb: handle "parity" internally in webutil.diffs() There's apparently no reason to have the "parity" of diff blocks that webutil.diffs() generates coming from outside the function. So have it internally managed. We thus now pass a "web" object to webutil.diffs() to get access to both "repo" and "stripecount" attribute.
Mon, 27 Mar 2017 09:44:36 +0900 largefiles: add lfile argument to updatestandin() for efficiency (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:36 +0900] rev 31659
largefiles: add lfile argument to updatestandin() for efficiency (API) Before this patch, updatestandin() takes "standin" argument, and applies splitstandin() on it to pick out a path to largefile (aka "lfile" or so) from standin. But in fact, all callers already knows "lfile". In addition to it, many callers knows both "standin" and "lfile". Therefore, making updatestandin() take only one of "standin" or "lfile" is inefficient.
Mon, 27 Mar 2017 09:44:36 +0900 largefiles: use strip() instead of slicing to get rid of EOL of standin
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:36 +0900] rev 31658
largefiles: use strip() instead of slicing to get rid of EOL of standin This slicing prevents from replacing SHA-1 by another (= longer hash value) in the future.
Mon, 27 Mar 2017 09:44:36 +0900 largefiles: rename local variable appropriately
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:36 +0900] rev 31657
largefiles: rename local variable appropriately repo['.'] is called not as "working context" but as "parent context". In this code path, hash value of current content of file should be compared against hash value recorded in "parent context". Therefore, "wctx" may cause misunderstanding in this case.
Mon, 27 Mar 2017 09:44:35 +0900 largefiles: avoid redundant loop to eliminate None from list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:35 +0900] rev 31656
largefiles: avoid redundant loop to eliminate None from list Before this patch, this code path contains two loops for m._files: one for replacement with standin, and another for elimination of None, which comes from previous replacement ("standin in wctx or lfdirstate[f] == 'r'" case in tostandin()). These two loops can be unified into simple one "for" loop.
Mon, 27 Mar 2017 09:44:35 +0900 largefiles: avoid meaningless changectx looking up
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:35 +0900] rev 31655
largefiles: avoid meaningless changectx looking up Logically, "repo[ctx.node()]" should be equal to "ctx". In addition to it, this redundant code path is repeated "len(match.m_files)" times.
Mon, 27 Mar 2017 09:44:35 +0900 largefiles: avoid redundant changectx looking up at each repetitions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:35 +0900] rev 31654
largefiles: avoid redundant changectx looking up at each repetitions These code paths look up changectx at each repetitions, even though the changectx key isn't changed while loop.
Mon, 27 Mar 2017 09:44:34 +0900 largefiles: omit updating newly added standin at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:34 +0900] rev 31653
largefiles: omit updating newly added standin at linear merging Updating standin for newly added largefile is needed, only if same name largefile exists in destination context at linear merging. In such case, updated standin is used to detect divergence of largefile at overridefilemerge(). Otherwise, standin doesn't have any responsibility for its content (usually, it is empty).
Mon, 27 Mar 2017 09:44:34 +0900 largefiles: reuse hexsha1() to centralize hash calculation logic into it
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:34 +0900] rev 31652
largefiles: reuse hexsha1() to centralize hash calculation logic into it This patch also renames argument of hexsha1(), not only for readability ("data" isn't good name for file-like object), but also for reviewability (including hexsha1() code helps reviewers to confirm how these functions are similar). BTW, copyandhash() has also similar logic, but it can't reuse hexsha1(), because it writes read-in data into specified fileobj simultaneously.
Sun, 26 Mar 2017 19:11:41 +0900 py3: prove second commit works
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Mar 2017 19:11:41 +0900] rev 31651
py3: prove second commit works Finally it works.
Sun, 26 Mar 2017 19:06:48 +0900 py3: fix manifestdict.fastdelta() to be compatible with memoryview
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Mar 2017 19:06:48 +0900] rev 31650
py3: fix manifestdict.fastdelta() to be compatible with memoryview This doesn't look nice, but a straightforward way to support Python 3. bytes(m[start:end]) is needed because a memoryview doesn't support ordering operations. On Python 2, m[start:end] returns a bytes object even if m is a buffer, so calling bytes() should involve no additional copy. I'm tired of trying cleaner alternatives, including: a. extend memoryview to be compatible with buffer type => memoryview is not an acceptable base type b. wrap memoryview by buffer-like class => zlib complains it isn't bytes-like
Sun, 26 Mar 2017 17:00:23 -0700 crecord: use ProgrammingError
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 17:00:23 -0700] rev 31649
crecord: use ProgrammingError
Sun, 26 Mar 2017 16:59:30 -0700 transaction: use ProgrammingError
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 16:59:30 -0700] rev 31648
transaction: use ProgrammingError
Sun, 26 Mar 2017 16:57:25 -0700 bundle2: use ProgrammingError
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 16:57:25 -0700] rev 31647
bundle2: use ProgrammingError
Sun, 26 Mar 2017 16:55:56 -0700 merge: use ProgrammingError
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 16:55:56 -0700] rev 31646
merge: use ProgrammingError
Sun, 26 Mar 2017 16:53:28 -0700 repair: use ProgrammingError
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 16:53:28 -0700] rev 31645
repair: use ProgrammingError
Sun, 26 Mar 2017 16:33:12 +0900 py3: abuse r'' to preserve str-ness of literals passed to __setattr__()
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Mar 2017 16:33:12 +0900] rev 31644
py3: abuse r'' to preserve str-ness of literals passed to __setattr__()
Sun, 26 Mar 2017 17:12:06 +0900 py3: fix slicing of byte string in revlog.compress()
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Mar 2017 17:12:06 +0900] rev 31643
py3: fix slicing of byte string in revlog.compress() I tried .startswith('\0'), but data wasn't always a bytes nor a bytearray.
Sun, 26 Mar 2017 16:31:01 +0900 py3: use bytes() to cast to immutable bytes in changelog.appender.write()
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Mar 2017 16:31:01 +0900] rev 31642
py3: use bytes() to cast to immutable bytes in changelog.appender.write()
Sun, 26 Mar 2017 16:16:45 +0900 py3: use bytes() to cast to immutable bytes in pure.bdiff.bdiff()
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Mar 2017 16:16:45 +0900] rev 31641
py3: use bytes() to cast to immutable bytes in pure.bdiff.bdiff()
Sun, 26 Mar 2017 16:14:04 +0900 bdiff: drop support for array.array argument from pure.bdiff.bdiff()
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Mar 2017 16:14:04 +0900] rev 31640
bdiff: drop support for array.array argument from pure.bdiff.bdiff() Thanks to 2a18e9e6ca43, we no longer pass array.array('c') object to bdiff().
Sun, 26 Mar 2017 15:55:34 +0200 histedit: test that an aborted histedit can be rerun (with obsolete)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 26 Mar 2017 15:55:34 +0200] rev 31639
histedit: test that an aborted histedit can be rerun (with obsolete) In the future, this should help catching issue as the one introduced in 6f0b7475cf9a.
Sun, 26 Mar 2017 15:46:09 +0200 histedit: backout changeset 6f0b7475cf9a
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 26 Mar 2017 15:46:09 +0200] rev 31638
histedit: backout changeset 6f0b7475cf9a Before 6f0b7475cf9a, histedit (like rebase) was only creating markers on final success from the old-rewritten node to the newly created nodes (as of before 6f0b7475cf9a). In case of abort the aborted attempt were stripped to restore the repository in its state prior to the attempt. This use of strip was on purpose. Using markers in this case introduces various issues. The main one is that keeping the partial result of histedit as obsolete prevents us to recreates the same nodes in a second attempt. The same operation will lead to an identical results, using an identical node that already exists in the repository as obsolete. To conclude, we cannot and should not switch to obsolescence markers creation on histedit --abort and we backout 6f0b7475cf9a. A test to catch this class of issue will be introduced in the next changeset.
Sun, 26 Mar 2017 15:34:39 +0200 histedit: backout changeset 2b599f5468a4
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 26 Mar 2017 15:34:39 +0200] rev 31637
histedit: backout changeset 2b599f5468a4 Its parent is about to be backedout so this one needs to be removed too.
Sun, 26 Mar 2017 16:48:29 -0400 revsetlang: fix _quote on int on python3
Augie Fackler <raf@durin42.com> [Sun, 26 Mar 2017 16:48:29 -0400] rev 31636
revsetlang: fix _quote on int on python3 Thanks to Yuya for spotting the need.
Sun, 26 Mar 2017 20:58:54 -0700 runtests: unset editor and pager related environment variables
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:58:54 -0700] rev 31635
runtests: unset editor and pager related environment variables Those environment variables could affect some configuration and future tests. Drop them to avoid issues.
Sun, 26 Mar 2017 17:59:33 -0700 debugfsinfo: improve case-sensitive testing
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 17:59:33 -0700] rev 31634
debugfsinfo: improve case-sensitive testing Previously the case-sensitive test was for the current directory, and is fragile with errors, and could remove a real file called ".debugfsinfo". This patch improves the case-sensitive testing so it test the given path using a unique temporary file, and does not crash on errors.
Sun, 26 Mar 2017 17:29:37 -0700 debugfsinfo: show fstype for given path
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 17:29:37 -0700] rev 31633
debugfsinfo: show fstype for given path
Sun, 26 Mar 2017 21:10:25 +0530 test-check-py3-commands: cleanup tests related to `hg status`
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 26 Mar 2017 21:10:25 +0530] rev 31632
test-check-py3-commands: cleanup tests related to `hg status` We were testing hg status on Python 3 at two places in the test. Cleaned up one of them.
Sun, 26 Mar 2017 20:58:21 +0530 diff: use pycompat.{byteskwargs, strkwargs} to switch opts b/w bytes and str
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 26 Mar 2017 20:58:21 +0530] rev 31631
diff: use pycompat.{byteskwargs, strkwargs} to switch opts b/w bytes and str
Sun, 26 Mar 2017 20:54:50 +0530 patch: make regular expressions bytes by adding b''
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 26 Mar 2017 20:54:50 +0530] rev 31630
patch: make regular expressions bytes by adding b''
Sun, 26 Mar 2017 20:49:18 +0530 dispatch: use pycompat.maplist() instead of map() to get a list
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 26 Mar 2017 20:49:18 +0530] rev 31629
dispatch: use pycompat.maplist() instead of map() to get a list
Sat, 25 Mar 2017 13:29:23 -0400 color: fix grammar in help text
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Mar 2017 13:29:23 -0400] rev 31628
color: fix grammar in help text
Sat, 25 Mar 2017 12:58:55 -0700 statfs: detect more filesystems on Linux
Jun Wu <quark@fb.com> [Sat, 25 Mar 2017 12:58:55 -0700] rev 31627
statfs: detect more filesystems on Linux Previously, the code only has what manpager says. In <linux/magic.h>, there are more defined. This patch adds filesystems that appear in the current Arch Linux's /proc/filesystems (autofs, overlay, securityfs) and f2fs, which was seen in news.
Thu, 23 Mar 2017 23:47:23 -0400 repair: use context manager for lock management
Matt Harbison <matt_harbison@yahoo.com> [Thu, 23 Mar 2017 23:47:23 -0400] rev 31626
repair: use context manager for lock management If repo.lock() raised inside of the try block, 'tr' would have been None in the finally block where it tries to release(). Modernize the syntax instead of just winching the lock out of the try block. I found several other instances of acquiring the lock inside of the 'try', but those finally blocks handle None references. I also started switching some trivial try/finally blocks to context managers, but didn't get them all because indenting over 3x for lock, wlock and transaction would have spilled over 80 characters. That got me wondering if there should be a repo.rwlock(), to handle locking and unlocking in the proper order. It also looks like py27 supports supports multiple context managers for a single 'with' statement. Should I hold off on the rest until py26 is dropped?
Fri, 24 Mar 2017 19:52:43 -0700 gitweb: use monospace font for commit messages
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 24 Mar 2017 19:52:43 -0700] rev 31625
gitweb: use monospace font for commit messages Commit messages often contain vertically aligned text. The default paper style already uses monospace fonts for rendering commit messages. And, AFAICT, a number of Git servers also render commit messages with monospace. It seems like the reasonable thing to do. This commit converts all instances of the full commit message in the gitweb style to render with monospace.
Fri, 24 Mar 2017 22:40:08 -0400 pager: improve support for various flavors of `more` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 24 Mar 2017 22:40:08 -0400] rev 31624
pager: improve support for various flavors of `more` on Windows Hardcoding 'more' -> 'more.com' means that 'more.exe' from MSYS would need to be configured with its *.exe extension. This will resolve to either one, as cmd.exe would have done if the command ran through the shell. Something that's maybe problematic with this is it comes after 'pageractive' and various ui configs have been set by the calling method. But the other early exits in this method don't undo those changes either.
Fri, 24 Mar 2017 15:05:42 -0700 statfs: avoid static allocation
Jun Wu <quark@fb.com> [Fri, 24 Mar 2017 15:05:42 -0700] rev 31623
statfs: avoid static allocation Previously we have "static struct statfs" to return a string. That is not multiple-thread safe. This patch moves the allocation to the caller to address the problem.
Fri, 24 Mar 2017 14:59:19 -0700 statfs: change Linux feature detection
Jun Wu <quark@fb.com> [Fri, 24 Mar 2017 14:59:19 -0700] rev 31622
statfs: change Linux feature detection Previously we check three things: "statfs" function, "linux/magic.h" and "sys/vfs.h" headers. But we didn't check "struct statfs" or the "f_type" field. That means if a system has "statfs" but "struct statfs" is not defined in the two header files we check, or defined without the "f_type" field, the compilation will fail. This patch combines the checks (2 headers + 1 function + 1 field) together and sets "HAVE_LINUX_STATFS". It makes setup.py faster (less checks), and more reliable (immutable to the issue above).
Fri, 24 Mar 2017 16:20:10 -0700 rebase: don't require destination if commands.rebase.requiredest=False
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Mar 2017 16:20:10 -0700] rev 31621
rebase: don't require destination if commands.rebase.requiredest=False
Fri, 24 Mar 2017 16:20:04 -0700 tests: add tests with commands.{update,rebase}.requiredest=False
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Mar 2017 16:20:04 -0700] rev 31620
tests: add tests with commands.{update,rebase}.requiredest=False This shows how rebase is currently broken with commands.rebase.requiredest=False.
Sun, 12 Mar 2017 12:33:35 -0700 rebase: move state serialization to use unfiltered repo
Durham Goode <durham@fb.com> [Sun, 12 Mar 2017 12:33:35 -0700] rev 31619
rebase: move state serialization to use unfiltered repo Now that rebasestate is serialized as part of the transaction, the repo state it sees is the version at the end of the transaction, which may have hidden nodes. Therefore, it's possible parts of the rebase commit set are no longer visible by the time the transaction is closing, which causes a filtered revision error in this code. I don't think state serialization should be blocked from accessing commits it knows exist, especially if all it's trying to do is get the hex of them, so let's use an unfiltered repo here. Unfortunately, the only known repro is with the fbamend Facebook extension, so I'm not sure how to repro it in core Mercurial for a test.
Fri, 24 Mar 2017 22:29:22 +0900 largefiles: avoid redundant standin() invocations
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 24 Mar 2017 22:29:22 +0900] rev 31618
largefiles: avoid redundant standin() invocations There are some code paths, which apply standin() on same value multilpe times instead of using already standin()-ed value. "fstandin" is common name for "path to standin file" in lfutil.py, to avoid shadowing "standin()".
Fri, 24 Mar 2017 22:29:22 +0900 largefiles: replace hashrepofile by hashfile (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 24 Mar 2017 22:29:22 +0900] rev 31617
largefiles: replace hashrepofile by hashfile (API) There is only one user for the former, and repo.wjoin()-ed value is alread known by that user.
Fri, 24 Mar 2017 22:26:34 +0900 largefiles: call readstandin() with changectx itself instead of rev or node
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 24 Mar 2017 22:26:34 +0900] rev 31616
largefiles: call readstandin() with changectx itself instead of rev or node readstandin() takes "node" argument to get changectx by "repo[node]". There are some readstandin() invocations, which use ctx.node(), ctx.rev(), or '.' as "node" argument above, even though corresponded changectx object is already looked up on caller side. This patch calls readstandin() with already known changectx itself, to avoid meaningless re-construction of changectx (indirect case via copytostore() is also included). BTW, copytostore() uses "rev" argument only for readstandin() invocation. Therefore, this patch also renames it to "revorctx" to indicate that it can take not only revision ID or so but also changectx, for readability.
Fri, 24 Mar 2017 22:24:59 +0900 largefiles: omit redundant splitstandin() invocations
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 24 Mar 2017 22:24:59 +0900] rev 31615
largefiles: omit redundant splitstandin() invocations There are 3 splitstandin() invocations in updatestandin() for same "standin" value.
Fri, 24 Mar 2017 22:24:59 +0900 largefiles: replace splitstandin() by isstandin() to omit str creation
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 24 Mar 2017 22:24:59 +0900] rev 31614
largefiles: replace splitstandin() by isstandin() to omit str creation If splitstandin()-ed str itself isn't used, isstandin() should be used instead of it, to omit meaningless str creation.
Fri, 24 Mar 2017 22:24:58 +0900 largefiles: omit redundant isstandin() before splitstandin()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 24 Mar 2017 22:24:58 +0900] rev 31613
largefiles: omit redundant isstandin() before splitstandin() There are many isstandin() invocations before splitstandin(). The former examines whether specified path starts with ".hglf/". The latter returns after ".hglf/" of specified path if it starts with that prefix, or returns None otherwise. Therefore, value returned by splitstandin() can be used for replacement of preceding isstandin(), and this replacement can omit redundant string comparison after isstandin().
Fri, 24 Mar 2017 22:13:23 +0900 misc: update descriptions about removed file for filectxfn
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 24 Mar 2017 22:13:23 +0900] rev 31612
misc: update descriptions about removed file for filectxfn Since 650b5b6e75ed, filectxfn for memctx should return None for removed file instead of raising IOError.
Mon, 20 Mar 2017 17:58:44 -0400 osx: always purge build/mercurial before starting build
Augie Fackler <augie@google.com> [Mon, 20 Mar 2017 17:58:44 -0400] rev 31611
osx: always purge build/mercurial before starting build This prevents stray files from previous builds from polluting newer builds.
Mon, 20 Mar 2017 17:49:47 -0400 osx: use more paranoid quoting in test
Augie Fackler <augie@google.com> [Mon, 20 Mar 2017 17:49:47 -0400] rev 31610
osx: use more paranoid quoting in test
Mon, 20 Mar 2017 17:50:05 -0400 osx: install completion scripts using install(1) to avoid umask badness
Augie Fackler <augie@google.com> [Mon, 20 Mar 2017 17:50:05 -0400] rev 31609
osx: install completion scripts using install(1) to avoid umask badness This actually fixes some tests that were showing us umask badness that had been overlooked.
Fri, 24 Mar 2017 08:37:26 -0700 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Mar 2017 08:37:26 -0700] rev 31608
merge with stable
Sun, 19 Mar 2017 01:47:56 -0400 py3: prove `hg {add,addremove,commit} all work
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:47:56 -0400] rev 31607
py3: prove `hg {add,addremove,commit} all work We can't do a second commit in a repo yet, because pure-Python bdiff is broken on Python 3. That is probably a good next step.
Thu, 23 Mar 2017 10:46:50 -0400 revsetlang: perform quoting using ui.escapestr instead of repr()
Augie Fackler <augie@google.com> [Thu, 23 Mar 2017 10:46:50 -0400] rev 31606
revsetlang: perform quoting using ui.escapestr instead of repr() This changes one of the doctest results, but I'm pretty sure on inspection that it's an equivalent result.
Thu, 23 Mar 2017 10:41:34 -0400 revsetlang: add docstring with some tests to _quote
Augie Fackler <augie@google.com> [Thu, 23 Mar 2017 10:41:34 -0400] rev 31605
revsetlang: add docstring with some tests to _quote
Sun, 19 Mar 2017 01:14:19 -0400 revsetlang: move quoting function to not be a closure
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:14:19 -0400] rev 31604
revsetlang: move quoting function to not be a closure I'm about to change the implementation here and I'd like to add some doctests, which means this needs to not be hidden inside another function.
Thu, 23 Mar 2017 10:33:20 -0400 revsetlang: portably bytestring-ify another pair of int() calls
Augie Fackler <augie@google.com> [Thu, 23 Mar 2017 10:33:20 -0400] rev 31603
revsetlang: portably bytestring-ify another pair of int() calls
Thu, 23 Mar 2017 21:23:21 -0700 checkcode: enforce lowercase for extension docstring title
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 21:23:21 -0700] rev 31602
checkcode: enforce lowercase for extension docstring title This will ensure new extensions are consistent and `hg help -e` has a consistent output. I have to add a new group since the normal "pypats" will be filtered by "pyfilters", which will remove comments and docstrings.
Thu, 23 Mar 2017 21:16:55 -0700 logtoprocess: use lowercase for docstring title
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 21:16:55 -0700] rev 31601
logtoprocess: use lowercase for docstring title
Thu, 23 Mar 2017 21:16:29 -0700 journal: use lowercase for docstring title
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 21:16:29 -0700] rev 31600
journal: use lowercase for docstring title See the previous patch for why.
Thu, 23 Mar 2017 21:15:39 -0700 automv: use lowercase for docstring title
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 21:15:39 -0700] rev 31599
automv: use lowercase for docstring title The first line of docstring is used in `hg help -e`. Use lowercase to be consistent with most extensions.
Thu, 23 Mar 2017 22:31:50 -0700 util: enable hardlink for some BSD-family filesystems
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 22:31:50 -0700] rev 31598
util: enable hardlink for some BSD-family filesystems Since we can now detect filesystems on FreeBSD and OSX. Add their major filesystems (ufs, zfs for FreeBSD; hfs for OSX) to the hardlink whitelist.
Thu, 23 Mar 2017 22:13:02 -0700 osutil: report fstype for BSD and OSX
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 22:13:02 -0700] rev 31597
osutil: report fstype for BSD and OSX
Thu, 23 Mar 2017 22:15:36 -0700 setup: use a more strict way to test BSD or OSX's statfs
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 22:15:36 -0700] rev 31596
setup: use a more strict way to test BSD or OSX's statfs We want to use the `f_fstypename` field to get the filesystem type. Test it directly. The new macro HAVE_BSD_STATFS implys the old HAVE_SYS_MOUNT_H and HAVE_SYS_PARAM_H. So the latter ones are removed.
Thu, 23 Mar 2017 12:03:19 -0700 debugfsinfo: use util.getfstype
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 12:03:19 -0700] rev 31595
debugfsinfo: use util.getfstype This changes the behavior slightly. It now always prints fstype, regardless of whether osutil.getfstype exists.
Thu, 23 Mar 2017 12:01:18 -0700 util: use util.getfstype
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 12:01:18 -0700] rev 31594
util: use util.getfstype
Thu, 23 Mar 2017 11:58:45 -0700 util: add a getfstype method
Jun Wu <quark@fb.com> [Thu, 23 Mar 2017 11:58:45 -0700] rev 31593
util: add a getfstype method The util version is a thin wrapper of the osutil version, which is not always available.
Mon, 20 Mar 2017 00:19:33 -0400 pager: fix the invocation of `more` on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 20 Mar 2017 00:19:33 -0400] rev 31592
pager: fix the invocation of `more` on Windows After 9335dc6b2a9c, with 'shell' being (mostly) set to False, invoking `more` no longer worked. Instead, a warning was printed and the pager was disabled. Invoking `more.com` works. Since a user may have configured 'pager.pager=more', do this substitution at the end. Surprisingly, `more` does allow for arguments, so those are preserved. This also allows `more` to work in MSYS. Setting 'shell=False' runs the executable via CreateProcess(), which has rather wonky rules for resolving an executable without an extension [1]. Resolving to *.com is not among them. Since 'shell=True' yields a cryptic error for a bad $PAGER, and a *.exe program will work without specifying the extension, sticking with current 'shell=False' seems like the right thing to do. I don't think there are any other *.com pagers out there, so this one special case seems OK. If somebody wants to do something crazy that requires cmd.exe, I was able to get normal paged output with 'pager.pager="cmd.exe /c more"'. I assume you can replace `more` with *.bat, *.vbs or various other creatures listed in $PATHEXT. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx
Wed, 22 Mar 2017 16:36:53 -0700 help: format ``commands`` heading correctly
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Mar 2017 16:36:53 -0700] rev 31591
help: format ``commands`` heading correctly The number of dashes under it needs to match exactly for it to be rendered as a heading. Without this change, the dashes end up on the same line as "commands", and "hg help config.commands" does not work.
Wed, 22 Mar 2017 14:12:58 -0500 convert: fix the handling of empty changlist descriptions in P4
David Soria Parra <davidsp@fb.com> [Wed, 22 Mar 2017 14:12:58 -0500] rev 31590
convert: fix the handling of empty changlist descriptions in P4 Empty changelist descriptions are valid in Perforce. If we encounter one of them we are currently running into an IndexError. In case of empty commit messages set the commit message to **empty changelist description**, which follows Perforce terminology.
Tue, 21 Mar 2017 17:50:44 -0700 status: support commands.status.relative config
Martin von Zweigbergk <martinvonz@google.com> [Tue, 21 Mar 2017 17:50:44 -0700] rev 31589
status: support commands.status.relative config When the config is set to true, status output becomes relative to the working directory. This has bugged me since I started using hg and it turns it is sillily simple to support it (unless I missed something, of course). We could also add a --relative flag, but I would personally always want that on, and I haven't heard any use for having it sometimes on, so this patch only lets you enable it via config.
Tue, 21 Mar 2017 21:26:52 -0700 plain: ignore [commands] config
Martin von Zweigbergk <martinvonz@google.com> [Tue, 21 Mar 2017 21:26:52 -0700] rev 31588
plain: ignore [commands] config We only have commands.{update,rebase}.requiredest so far. We should clearly ignore those two if HGPLAIN is in effect, and it seems like we should ignore any future config that will be added in [commands] since that is about changing the behavior of commands. Thanks to Yuya for suggesting to centralize the code in ui.py. While at it, remove the unnecessary False values passed to ui.configbool() for the aforementioned config options.
Thu, 23 Mar 2017 19:54:59 -0700 changegroup: store old heads as a set stable 4.1.2
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 23 Mar 2017 19:54:59 -0700] rev 31587
changegroup: store old heads as a set Previously, the "oldheads" variable was a list. On a repository at Mozilla with 46,492 heads, profiling revealed that list membership testing was dominating execution time of applying small changegroups. This patch converts the list of old heads to a set. This makes membership testing significantly faster. On the aforementioned repository with 46,492 heads: $ hg unbundle <file with 1 changeset> before: 18.535s wall after: 1.303s Consumers of this variable only check for truthiness (`if oldheads`), length (`len(oldheads)`), and (most importantly) item membership (`h not in oldheads` - which occurs twice). So, the change to a set should be safe and suitable for stable. The practical effect of this change is that changegroup application and related operations (like `hg push`) no longer exhibit an O(n^2) CPU explosion as the number of heads grows.
Tue, 21 Mar 2017 23:30:13 +0100 checkheads: extract obsolete post processing in its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Mar 2017 23:30:13 +0100] rev 31586
checkheads: extract obsolete post processing in its own function The checkheads function is long and complex, extract that logic in a subfunction is win in itself. As the comment in the code says, this postprocessing is currently very basic and either misbehave or fails to detect valid push in many cases. My deeper motive for this extraction is to be make it easier to provide extensive testing of this case and strategy to cover them. Final test and logic will makes it to core once done.
Wed, 22 Mar 2017 11:26:23 -0700 tests: make test-simplekeyvaluefile.py py2.6-compatible
Kostia Balytskyi <ikostia@fb.com> [Wed, 22 Mar 2017 11:26:23 -0700] rev 31585
tests: make test-simplekeyvaluefile.py py2.6-compatible Python 2.6 unittest.TestCase does not have assertRaisesRegexp.
Thu, 23 Mar 2017 20:57:27 +0900 similar: use cheaper hash() function to test exact matches
Yuya Nishihara <yuya@tcha.org> [Thu, 23 Mar 2017 20:57:27 +0900] rev 31584
similar: use cheaper hash() function to test exact matches We just need a hash table {fctx.data(): fctx} which doesn't keep fctx.data() in memory. Let's simply use hash(fctx.data()) to put data out from memory, and manage collided fctx objects by list. This isn't significantly faster than using sha1, but is more correct as we know SHA-1 collision attack is getting practical. Benchmark with 50k added/removed files, on tmpfs: $ hg addremove --dry-run --time -q previous: real 12.420 secs (user 11.120+0.000 sys 1.280+0.000) this patch: real 12.350 secs (user 11.210+0.000 sys 1.140+0.000)
(0) -30000 -10000 -3000 -1000 -240 +240 +1000 +3000 +10000 tip