Sun, 01 Apr 2018 22:37:03 +0900 hgweb: move archivelist() of hgwebdir to webutil
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Apr 2018 22:37:03 +0900] rev 37513
hgweb: move archivelist() of hgwebdir to webutil
Sun, 01 Apr 2018 22:33:55 +0900 hgweb: drop archivespecs from requestcontext
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Apr 2018 22:33:55 +0900] rev 37512
hgweb: drop archivespecs from requestcontext It's a constant.
Sun, 01 Apr 2018 22:32:34 +0900 hgweb: move archivespecs to webutil
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Apr 2018 22:32:34 +0900] rev 37511
hgweb: move archivespecs to webutil Move one step further from e38e7ea21987. Since 'archivespecs' is a constant shared with hgweb and hgwebdir, webutil is a better place to define it.
Sun, 01 Apr 2018 22:20:44 +0900 hgweb: wrap {labels} by hybridlist()
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Apr 2018 22:20:44 +0900] rev 37510
hgweb: wrap {labels} by hybridlist() This one is a simple list of strings, which can support map operation.
Sun, 01 Apr 2018 22:14:36 +0900 hgweb: wrap {pathdef} with mappinglist
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Apr 2018 22:14:36 +0900] rev 37509
hgweb: wrap {pathdef} with mappinglist No bare list of mappings should be put in a template mapping.
Sun, 01 Apr 2018 22:11:58 +0900 hgwebdir: wrap {entries} with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Apr 2018 22:11:58 +0900] rev 37508
hgwebdir: wrap {entries} with mappinggenerator No bare generator should be put in a template mapping.
Fri, 06 Apr 2018 09:53:17 -0700 eol: look up partial nodeid as partial nodeid
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 09:53:17 -0700] rev 37507
eol: look up partial nodeid as partial nodeid Similar reasoning as the previous patch. For some reason the hook gives us a partial nodeid, so we need to resolve that to a full nodeid. Differential Revision: https://phab.mercurial-scm.org/D3159
Fri, 06 Apr 2018 09:43:17 -0700 histedit: look up partial nodeid as partial nodeid
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 09:43:17 -0700] rev 37506
histedit: look up partial nodeid as partial nodeid I'm about to remove support for repo[<partial hex nodeid>]. In the verify() method, we know that self.node is always a partial or full binary nodeid, so the most correct way to look up the revision is by using changelog._partialmatch(), so let's do that. (It's closer to the current code to do scmutil.revsymbol(), but that's less correct because it will match a bookmark or tag that happens to have the same prefix as the node.) Differential Revision: https://phab.mercurial-scm.org/D3158
Fri, 06 Apr 2018 09:41:25 -0700 histedit: drop unnecessary check for "self.node is not None"
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 09:41:25 -0700] rev 37505
histedit: drop unnecessary check for "self.node is not None" We are doing hex(self.node) just a few lines up, so it shouldn't be None. The only way it could be none is if it was reassigned in between. The only way that can happen is if the user had put a "ffff..." wdirhex revision in the histedit script. This code is much older than the "ffff..." identifier, so I'm confident it's not there to handle that case. I'll let someone else add proper checks for "ffff..." if they care enough. Differential Revision: https://phab.mercurial-scm.org/D3157
Sun, 08 Apr 2018 08:06:34 -0700 context: extract partial nodeid lookup method to scmutil
Martin von Zweigbergk <martinvonz@google.com> [Sun, 08 Apr 2018 08:06:34 -0700] rev 37504
context: extract partial nodeid lookup method to scmutil We will add another caller soon, and there's a non-obvious reason to use the unfiltered repo that we don't want to copy across the code base. Differential Revision: https://phab.mercurial-scm.org/D3189
Mon, 19 Mar 2018 20:23:27 +0900 templatekw: fix return type of {succsandmarkers} (BC)
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 20:23:27 +0900] rev 37503
templatekw: fix return type of {succsandmarkers} (BC) A hybrid object represents a list/dict of values, but {succsandmarkers} returns a list of template mappings. This change means old-style list templates (e.g. "start_succsandmarkers") are no longer supported, but that should be okay since {succsandmarkers} is still experimental and relatively new.
Sat, 17 Mar 2018 23:34:38 +0900 formatter: remove template resources from nested items before generating JSON
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 23:34:38 +0900] rev 37502
formatter: remove template resources from nested items before generating JSON
Thu, 15 Mar 2018 21:09:37 +0900 templater: add public interface returning a set of resource keys
Yuya Nishihara <yuya@tcha.org> [Thu, 15 Mar 2018 21:09:37 +0900] rev 37501
templater: add public interface returning a set of resource keys The next patch depends on knownresourcekeys(), and there's no reason to keep availableresourcekeys() private.
Thu, 15 Mar 2018 22:27:16 +0900 formatter: make nested items somewhat readable in template output
Yuya Nishihara <yuya@tcha.org> [Thu, 15 Mar 2018 22:27:16 +0900] rev 37500
formatter: make nested items somewhat readable in template output
Sun, 18 Mar 2018 23:36:52 +0900 templater: wrap result of '%' operation so it never looks like a thunk
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 23:36:52 +0900] rev 37499
templater: wrap result of '%' operation so it never looks like a thunk This fixes min/max()/json() of map result. Before, it was taken as a lazy byte string and stringified by evalfuncarg().
Thu, 18 Jan 2018 12:54:01 +0100 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de> [Thu, 18 Jan 2018 12:54:01 +0100] rev 37498
wireproto: support for pullbundles Pullbundles are similar to clonebundles, but served as normal inline bundle streams. They are almost transparent to the client -- the only visible effect is that the client might get less changes than what it asked for, i.e. not all requested head revisions are provided. The client announces support for the necessary retries with the partial-pull capability. After receiving a partial bundle, it updates the set of revisions shared with the server and drops all now-known heads from the request list. It will then rerun getbundle until no changes are received or all remote heads are present. Extend badserverext to support per-socket limit, i.e. don't assume that the same limits should be applied to all sockets. Differential Revision: https://phab.mercurial-scm.org/D1856
Fri, 06 Apr 2018 22:39:58 -0700 filelog: wrap revlog instead of inheriting it (API)
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 06 Apr 2018 22:39:58 -0700] rev 37497
filelog: wrap revlog instead of inheriting it (API) The revlog base class exposes a ton of methods. Inheriting the revlog class for filelog will make it difficult to expose a clean interface. There will be abstraction violations. This commit breaks the inheritance of revlog by the filelog class. Filelog instances now contain a reference to a revlog instance. Various properties and methods are now proxied to that instance. There is precedence for doing this: manifestlog does something similar. Although, manifestlog has a cleaner interface than filelog. We'll get there with filelog... The new filelog class exposes a handful of extra properties and methods that aren't part of the declared filelog interface. Every extra item was added in order to get a test to pass. The set of tests that failed without these extra proxies has significant overlap with the set of tests that don't work with the simple store repo. There should be no surprise there. Hopefully the hardest part about this commit to review are the changes to bundlerepo and unionrepo. Both repository types define a custom revlog or revlog-like class and then have a custom filelog that inherits from both filelog and their custom revlog. This code has been changed so the filelog types don't inherit from revlog. Instead, they replace the revlog instance on the created filelog. This is super hacky. I plan to fix this in a future commit by parameterizing filelog.__init__. Because Python function call overhead is a thing, this change could impact performance by introducing a nearly empty proxy function for various methods and properties. I would gladly measure the performance impact of it, but I'm not sure what operations have tight loops over filelog attribute lookups or function calls. I know some of the DAG traversal code can be sensitive about the performance of e.g. parentrevs(). However, many of these functions are implemented on the revlog class and therefore have direct access to self.parentrevs() and aren't going through a proxy. .. api:: filelog.filelog is now a standalone class and doesn't inherit from revlog. Instead, it wraps a revlog instance at self._revlog. This change was made in an attempt to formalize storage APIs and prevent revlog implementation details leaking through to callers. Differential Revision: https://phab.mercurial-scm.org/D3154
Mon, 09 Apr 2018 10:18:10 -0700 util: drop write_content_size=True
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 09 Apr 2018 10:18:10 -0700] rev 37496
util: drop write_content_size=True This is now the default in python-zstandard 0.9. While we're here, also add a comment about the ability to drop frame magic to save space. Differential Revision: https://phab.mercurial-scm.org/D3199
Mon, 09 Apr 2018 10:13:29 -0700 zstandard: vendor python-zstandard 0.9.0
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 09 Apr 2018 10:13:29 -0700] rev 37495
zstandard: vendor python-zstandard 0.9.0 This was just released. It features a number of goodies. More info at https://gregoryszorc.com/blog/2018/04/09/release-of-python-zstandard-0.9/. The clang-format ignore list was updated to reflect the new source of files. The project contains a vendored copy of zstandard 1.3.4. The old version was 1.1.3. One of the changes between those versions is that zstandard is now dual licensed BSD + GPLv2 and the patent rights grant has been removed. Good riddance. The API should be backwards compatible. So no changes in core should be needed. However, there were a number of changes in the library that we'll want to adapt to. Those will be addressed in subsequent commits. Differential Revision: https://phab.mercurial-scm.org/D3198
Sun, 08 Apr 2018 01:08:43 +0200 revlog: reset _nodepos after strip
Joerg Sonnenberger <joerg@bec.de> [Sun, 08 Apr 2018 01:08:43 +0200] rev 37494
revlog: reset _nodepos after strip When using the pure revlog parser, _nodepos is used to keep track of the position during index scanning in the non-cached cache. If it is out of bounds, BaseIndexObject._fix_index will assert. Since strip can actually remove the position scanned last, make sure to reset it. Add an assertion in the place where the invariance is clearer. Differential Revision: https://phab.mercurial-scm.org/D3188
Wed, 04 Apr 2018 13:14:48 +0800 paper: make all source lines have the same minimum height
Anton Shestakov <av6@dwimlabs.net> [Wed, 04 Apr 2018 13:14:48 +0800] rev 37493
paper: make all source lines have the same minimum height Empty source lines in paper and coal themes used to have smaller height than every other line (because of the way line numbers are shown and because they are using smaller font). This wasn't very noticeable before the follow lines functionality was added, but after that just using the follow-lines button to select a block of code with empty lines would demonstrate the fact that empty lines didn't have enough height - there were white "gaps" in the selection block. Since this problem occurs when lines don't have any content inside, let's create a pseudo-element (it's unselectable because of that) which still doesn't have any content, but fills up empty lines to 100% of their height because of display: inline-block. This is the most natural way to solve this annoyance that I've found so far. Hardcoding height isn't useful because we can have wrapped lines, in which case multiple lines of text need to fit into a single <span>. Setting min-height or line-height doesn't remove the gaps when viewed in Chromium.
Sun, 08 Apr 2018 20:53:07 +0800 hgweb: make followlines button absolutely positioned
Anton Shestakov <av6@dwimlabs.net> [Sun, 08 Apr 2018 20:53:07 +0800] rev 37492
hgweb: make followlines button absolutely positioned It used to have position: absolute only on annotate page, but it makes sense to have it everywhere, because the button shouldn't affect other elements at all. Especially since the button has a set height, which meant that for certain smaller fonts source lines were changing their height on hover. Note that the button doesn't set any of the usual properties that accompany absolute position (top, right, bottom or left). These properties would position the button without any account for source line padding. Instead, margins are used (the button already has all margins defined, they do the job).
Mon, 09 Apr 2018 22:00:11 +0800 hgweb: insert followlines buttons before any children, including text nodes
Anton Shestakov <av6@dwimlabs.net> [Mon, 09 Apr 2018 22:00:11 +0800] rev 37491
hgweb: insert followlines buttons before any children, including text nodes This way the buttons come before any other content, including text nodes. Because highlight extension replaces every line of text with some <span> elements that have CSS classes for highlighting, the placement of followlines buttons used to depend on if that extension was enabled or not. Let's make the placement more consistent, it'll help the next patch in this series.
Wed, 28 Mar 2018 16:28:54 -0700 wireproto: only expose "debugwireargs" to version 1 transports
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 16:28:54 -0700] rev 37490
wireproto: only expose "debugwireargs" to version 1 transports I'm not even sure this command should be enabled for version 1 transports. It is just a reflection endpoint for argument data. We definitely don't need to support it in version 2. Differential Revision: https://phab.mercurial-scm.org/D3184
Wed, 28 Mar 2018 16:14:42 -0700 wireproto: only expose "hello" command to version 1 transports
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 16:14:42 -0700] rev 37489
wireproto: only expose "hello" command to version 1 transports This command is only ever used for the handshake in the SSH protocol. We probably don't even need for it to be a proper command. Let's not carry it forward to version 2 because I don't see a use for it there. Differential Revision: https://phab.mercurial-scm.org/D3183
Wed, 28 Mar 2018 16:10:41 -0700 wireproto: port branchmap to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 16:10:41 -0700] rev 37488
wireproto: port branchmap to wire protocol v2 Differential Revision: https://phab.mercurial-scm.org/D3182
Wed, 28 Mar 2018 16:00:02 -0700 wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 16:00:02 -0700] rev 37487
wireproto: port listkeys commands to wire protocol v2 Differential Revision: https://phab.mercurial-scm.org/D3181
Wed, 28 Mar 2018 15:44:47 -0700 wireproto: port keep command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 15:44:47 -0700] rev 37486
wireproto: port keep command to wire protocol v2 This is pretty straightforward. Differential Revision: https://phab.mercurial-scm.org/D3180
Wed, 28 Mar 2018 14:55:13 -0700 wireproto: port heads command to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 14:55:13 -0700] rev 37485
wireproto: port heads command to wire protocol v2 After much thought and consideration, wire protocol version 2's commands will be defined in different functions from the existing commands. This will make it easier to implement these commands because it won't require shoehorning things like response formatting and argument declaration into the same APIs. For example, wire protocol version 1 requires that commands declare a fixed and ordered list of argument names. It isn't really possible to insert new arguments or have optional arguments without breaking backwards compatibility. Wire protocol version 2, however, uses CBOR maps for passing arguments. So arguments a) can be optional b) can be added without BC c) can be strongly typed. This commit starts our trek towards reimplementing the wire protocol for version 2 with the heads command. It is pretty similar to the existing heads command. One added feature is it can be told to operate on only public phase changesets. This is useful for making discovery faster when a repo has tens of thousands of draft phase heads (such as Mozilla's "try" repository). The HTTPv2 server-side protocol has had its `getargs()` implementation updated to reflect that arguments are a map and not a list. Differential Revision: https://phab.mercurial-scm.org/D3179
Wed, 28 Mar 2018 10:52:40 -0700 largefiles: wrap heads command handler more directly
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 10:52:40 -0700] rev 37484
largefiles: wrap heads command handler more directly extensions.wrapfunction() is a more robust method for wrapping a function, since it allows multiple wrappers. While we're here, wrap the function registered with the command instead of installing a new command handler. Differential Revision: https://phab.mercurial-scm.org/D3178
Wed, 28 Mar 2018 15:09:34 -0700 wireproto: crude support for version 2 HTTP peer
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 15:09:34 -0700] rev 37483
wireproto: crude support for version 2 HTTP peer As part of implementing the server-side bits of the wire protocol command handlers for version 2, we want a way to easily test those commands. Currently, we use the "httprequest" action of `hg debugwireproto`. But this requires explicitly specifying the HTTP request headers, low-level frame details, and the data structure to encode with CBOR. That's a lot of boilerplate and a lot of it can change as the wire protocol evolves. `hg debugwireproto` has a mechanism to issue commands via the peer interface. That is *much* easier to use and we prefer to test with that going forward. This commit implements enough parts of the peer API to send basic requests via the HTTP version 2 transport. The peer code is super hacky. Again, the goal is to facilitate server testing, not robustly implement a client. The client code will receive love at a later time. Differential Revision: https://phab.mercurial-scm.org/D3177
Mon, 26 Mar 2018 15:34:52 -0700 tests: extract wire protocol shell helpers to standalone file
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 26 Mar 2018 15:34:52 -0700] rev 37482
tests: extract wire protocol shell helpers to standalone file This will make it easier for other tests to get up and running without the boilerplate. Differential Revision: https://phab.mercurial-scm.org/D3176
Sun, 08 Apr 2018 09:30:35 -0700 addbranchrevs: no longer accept revset as "revs" (API)
Martin von Zweigbergk <martinvonz@google.com> [Sun, 08 Apr 2018 09:30:35 -0700] rev 37481
addbranchrevs: no longer accept revset as "revs" (API) The only caller was removed in 0b4692b9646d (bundle: avoid repo.lookup() for converting revnum to nodeid, 2018-04-02). Differential Revision: https://phab.mercurial-scm.org/D3192
Sun, 08 Apr 2018 08:53:43 -0700 clone: avoid using repo.lookup() with binary nodeid
Martin von Zweigbergk <martinvonz@google.com> [Sun, 08 Apr 2018 08:53:43 -0700] rev 37480
clone: avoid using repo.lookup() with binary nodeid The code in hg.clone() is a bit of a mess, but it seems like the "checkout" variable is always a binary nodeid (tests pass when run with "assert len(checkout) == 20" before the repo.lookup()). repo.lookup() will soon work only with string inputs, so we need remove this use. Differential Revision: https://phab.mercurial-scm.org/D3191
Sun, 08 Apr 2018 08:41:58 -0700 merge: avoid unnecessary conversion from binary nodeid to binary nodeid
Martin von Zweigbergk <martinvonz@google.com> [Sun, 08 Apr 2018 08:41:58 -0700] rev 37479
merge: avoid unnecessary conversion from binary nodeid to binary nodeid "node" is already a binary nodeid here, so there's no need to convert it. repo.lookup() will soon lose support for binary nodeids as input. Differential Revision: https://phab.mercurial-scm.org/D3190
Sun, 08 Apr 2018 22:56:16 -0400 tests: stabilize test-push-http.t for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Apr 2018 22:56:16 -0400] rev 37478
tests: stabilize test-push-http.t for Windows See 594dd384803c.
Sat, 07 Apr 2018 13:10:20 -0400 tests: add a substitution pattern for HTTP error log dates
Matt Harbison <matt_harbison@yahoo.com> [Sat, 07 Apr 2018 13:10:20 -0400] rev 37477
tests: add a substitution pattern for HTTP error log dates This will make tests with error log content less of a nuisance. I didn't roll it into to $LOGDATE$ because the regex got long and line wrapped. It didn't seem worth the obscurity.
Sun, 08 Apr 2018 11:55:46 +0900 wireproto: convert python literal to object without using unsafe eval()
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 11:55:46 +0900] rev 37476
wireproto: convert python literal to object without using unsafe eval() Follows up cc5a040fe150. At this point, I don't think we need a real eval(). If we want to support a set literal, maybe we can vendor ast.literal_eval(), which is relatively simple function.
Sun, 08 Apr 2018 12:30:59 +0900 tests: quote variable passed to shell test command
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 12:30:59 +0900] rev 37475
tests: quote variable passed to shell test command
Sun, 08 Apr 2018 11:23:55 +0900 py3: system-stringify repr(frame)
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 11:23:55 +0900] rev 37474
py3: system-stringify repr(frame) That's the Py3 requirement.
Sun, 08 Apr 2018 11:21:58 +0900 wireproto: show unknown id and flags in repr(frame)
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 11:21:58 +0900] rev 37473
wireproto: show unknown id and flags in repr(frame) Perhaps we'll want it for debugging.
Sun, 08 Apr 2018 11:14:47 +0900 wireproto: fix repr(frame) to not crash by unknown type id
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 11:14:47 +0900] rev 37472
wireproto: fix repr(frame) to not crash by unknown type id Follows up 5ef2da00e935.
Sun, 08 Apr 2018 15:39:08 +0900 py3: use s.startswith() instead of s[n] while parsing patches
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 15:39:08 +0900] rev 37471
py3: use s.startswith() instead of s[n] while parsing patches I know 'bytes[n] in bytes' magically works, but I'm tired of finding which one breaks the tests.
Sun, 08 Apr 2018 15:32:09 +0900 py3: do not try to byte-stringify None in cmdutil.tryimportone()
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 15:32:09 +0900] rev 37470
py3: do not try to byte-stringify None in cmdutil.tryimportone() It's a debug message, so just use '' instead.
Sun, 08 Apr 2018 15:22:30 +0900 py3: work around weird handling of bytes/unicode in decode_header()
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 15:22:30 +0900] rev 37469
py3: work around weird handling of bytes/unicode in decode_header() Basically decode_header() works as follows, and on Python 3, email headers ARE UNICODE. def decode_header(header): if not ecre.search(header): # ecre is unicode regexp return [(header, None)] # so header is unicode string ... decode header into [(bytes_data, unicode_charset_name)] return collapsed
Sun, 08 Apr 2018 15:03:00 +0900 py3: use system string to access email headers
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 15:03:00 +0900] rev 37468
py3: use system string to access email headers
Sun, 08 Apr 2018 14:59:12 +0900 py3: fix string issues of email message in test-import.t
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 14:59:12 +0900] rev 37467
py3: fix string issues of email message in test-import.t - payload can be bytes - headers must be unicode on Python 3 - need to call msg.as_bytes() on Python 3, but msg.as_string() on Python 2, where bytes(msg) magic works
Sun, 08 Apr 2018 14:46:24 +0900 py3: use lower-cased module 'email.message' in test-import.t
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 14:46:24 +0900] rev 37466
py3: use lower-cased module 'email.message' in test-import.t
Sun, 08 Apr 2018 15:41:40 +0900 py3: drop b'' from error message of fancyopts
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Apr 2018 15:41:40 +0900] rev 37465
py3: drop b'' from error message of fancyopts
Sat, 07 Apr 2018 21:26:37 +0900 procutil: drop unused 'newlines' option from popen*() (API)
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 21:26:37 +0900] rev 37464
procutil: drop unused 'newlines' option from popen*() (API) It's unlikely for us to use the universal_newlines option.
Sat, 07 Apr 2018 21:23:42 +0900 procutil: make explainexit() simply return a message (API)
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 21:23:42 +0900] rev 37463
procutil: make explainexit() simply return a message (API) Almost all callers want it.
Sat, 07 Apr 2018 21:21:03 +0900 procutil: do not convert return code of signal exit to positive number (API)
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 21:21:03 +0900] rev 37462
procutil: do not convert return code of signal exit to positive number (API) The docstring states that "codes from kill are negative", and it doesn't make sense to make exit/signal code ambiguous. .. api:: ``hook.hook()`` and ``hook.runhooks()`` may return a negative integer to denote that the process was killed by signal.
Sat, 07 Apr 2018 21:17:50 +0900 procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 21:17:50 +0900] rev 37461
procutil: fix error message of tempfile filter First, we need to use procutil.system() to get an exit code compatible with explainexit(). Second, explainexit() returns (msg, code) tuple.
Sat, 07 Apr 2018 21:14:16 +0900 procutil: unify platform.explainexit()
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 21:14:16 +0900] rev 37460
procutil: unify platform.explainexit() Since 4368f582c806 "use subprocess instead of os.system", posix.explainexit() is the superset of Windows implementation.
Sat, 07 Apr 2018 21:09:21 +0900 procutil: rewrite popen() as a subprocess.Popen wrapper (issue4746) (API)
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 21:09:21 +0900] rev 37459
procutil: rewrite popen() as a subprocess.Popen wrapper (issue4746) (API) os.popen() of Python 3 is not the popen() we want. First, it doesn't accept command in bytes. Second, a returned stream is always wrapped by TextIO. So we have to reimplement our popen(). Fortunately, this fixes the bug 4746 since ours returns an exit code compatible with explainexit(). .. api:: ``procutil.popen()`` no longer supports text mode I/O.
Sat, 07 Apr 2018 20:50:38 +0900 procutil: always popen() in binary mode
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 20:50:38 +0900] rev 37458
procutil: always popen() in binary mode On Python 3, non-binary stream is useless. Let's convert line ending by ourselves. Note that we don't need fromnativeeol() in patch._externalpatch() since any whitespace characters are rstrip()-ed.
Sat, 07 Apr 2018 13:46:32 +0900 py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 13:46:32 +0900] rev 37457
py3: byte-stringify test-import.t Still the test doesn't pass. # skip-blame because just adding some b''
Sat, 07 Apr 2018 13:42:37 +0900 py3: convert parsed message items to bytes in patch.extract()
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 13:42:37 +0900] rev 37456
py3: convert parsed message items to bytes in patch.extract() Appears that BytesParser() parses bytes into unicode, sigh.
Sat, 07 Apr 2018 13:21:59 +0900 py3: silence warning about deprecation of imp module
Yuya Nishihara <yuya@tcha.org> [Sat, 07 Apr 2018 13:21:59 +0900] rev 37455
py3: silence warning about deprecation of imp module Well, we could fix that, but we aren't yet to reach the state caring about deprecation on the Python 3 line. So let's silence it for now to fix tons of "minor" Py2/3 incompatibilities by relying on our test suite.
Sat, 07 Apr 2018 00:00:33 -0700 tests: add another full hex node in plain text
Martin von Zweigbergk <martinvonz@google.com> [Sat, 07 Apr 2018 00:00:33 -0700] rev 37454
tests: add another full hex node in plain text Should have been part of D3168. Differential Revision: https://phab.mercurial-scm.org/D3186
Thu, 05 Apr 2018 16:50:19 -0700 infinitepush: look up bookmarks only among bookmarks
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 16:50:19 -0700] rev 37453
infinitepush: look up bookmarks only among bookmarks Differential Revision: https://phab.mercurial-scm.org/D3165
Fri, 06 Apr 2018 10:48:11 -0700 destutil: look up bookmarks only among bookmarks
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 10:48:11 -0700] rev 37452
destutil: look up bookmarks only among bookmarks Differential Revision: https://phab.mercurial-scm.org/D3164
Fri, 06 Apr 2018 10:49:43 -0700 discovery: look up bookmarks only among bookmarks
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 10:49:43 -0700] rev 37451
discovery: look up bookmarks only among bookmarks Differential Revision: https://phab.mercurial-scm.org/D3163
Fri, 06 Apr 2018 11:29:30 -0700 bookmarks: introduce a repo._bookmarks.changectx(mark) method and use it
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 11:29:30 -0700] rev 37450
bookmarks: introduce a repo._bookmarks.changectx(mark) method and use it Many places were doing repo[mark], which usually works, but it's slightly incorrect: if the bookmark has a name that matches a full hex nodeid of another node, then the context for the other node will be returned instead. Also, I'm about to remove support for repo[<namespace thing>] :) Differential Revision: https://phab.mercurial-scm.org/D3162
Sun, 25 Mar 2018 18:34:07 +0900 revlog: detect pseudo file nodeids to raise WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Mar 2018 18:34:07 +0900] rev 37449
revlog: detect pseudo file nodeids to raise WdirUnsupported exception Again, I'm not sure if this is the right thing, but adding a few more pseudo hashes wouldn't be any worse than the current state. Differential Revision: https://phab.mercurial-scm.org/D2942
Sun, 25 Mar 2018 18:31:22 +0900 node: rename wdirnodes to clarify they are for manifest/filelogs
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Mar 2018 18:31:22 +0900] rev 37448
node: rename wdirnodes to clarify they are for manifest/filelogs Differential Revision: https://phab.mercurial-scm.org/D2941
Sun, 25 Mar 2018 18:27:43 +0900 workingctx: build _manifest on filenode() or flags() request
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Mar 2018 18:27:43 +0900] rev 37447
workingctx: build _manifest on filenode() or flags() request I'm not sure if this is the best workaround, but this fixes the following exception: AttributeError: 'workingctx' object has no attribute '_manifestdelta' The short hash '303030303030' seen in the test is node.modifiednodeid. Differential Revision: https://phab.mercurial-scm.org/D2940
Fri, 06 Apr 2018 13:11:40 -0700 tests: enter full hex hash in plain text in bundle part
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 13:11:40 -0700] rev 37446
tests: enter full hex hash in plain text in bundle part We were looking it up be prefix by repo.__getitem__, which I'm about to drop support for. It's easiest to just include the full hash in plain text. Differential Revision: https://phab.mercurial-scm.org/D3168
Thu, 05 Apr 2018 17:44:18 -0700 tests: call rawsize() directly
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Apr 2018 17:44:18 -0700] rev 37445
tests: call rawsize() directly rawsize() is not reimplemented outside of revlog. I'm not sure why this code was insisting it call a specific implementation. Changing it to call rawsize() on the repo.file(f) result seems to work just fine. Differential Revision: https://phab.mercurial-scm.org/D3153
Thu, 05 Apr 2018 17:40:51 -0700 upgrade: sniff for filelog type
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Apr 2018 17:40:51 -0700] rev 37444
upgrade: sniff for filelog type The upgrade code should never encounter a vanilla revlog instance: only changelog, manifestrevlog, and filelog should be seen. The previous code assumed !changelog & !manifestrevlog meant file data. So this change feels pretty safe. If nothing else, it will help tease out typing issues. Differential Revision: https://phab.mercurial-scm.org/D3152
Thu, 05 Apr 2018 16:31:45 -0700 revlog: move censor logic into main revlog class
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Apr 2018 16:31:45 -0700] rev 37443
revlog: move censor logic into main revlog class Previously, the revlog class implemented dummy methods for various censor-related functionality. Revision censoring was (and will continue to be) only possible on filelog instances. So filelog implemented these methods to perform something reasonable. A problem with implementing censoring on filelog is that it assumes filelog is a revlog. Upcoming work to formalize the filelog interface will make this not true. Furthermore, the censoring logic is security-sensitive. I think action-at-a-distance with custom implementation of core revlog APIs in derived classes is a bit dangerous. I think at a minimum the censor logic should live in revlog.py. I was tempted to created a "censored revlog" class that basically pulled these methods out of filelog. But, I wasn't a huge fan of overriding core methods in child classes. A reason to do that would be performance. However, the censoring code only comes into play when: * hash verification fails * delta generation * applying deltas from changegroups The new code is conditional on an instance attribute. So the overhead for running the censored code when the revlog isn't censorable is an attribute lookup. All of these operations are at least a magnitude slower than a Python attribute lookup. So there shouldn't be a performance concern. Differential Revision: https://phab.mercurial-scm.org/D3151
Thu, 05 Apr 2018 18:22:35 -0700 revlog: move parsemeta() and packmeta() from filelog (API)
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Apr 2018 18:22:35 -0700] rev 37442
revlog: move parsemeta() and packmeta() from filelog (API) filelog.parsemeta() and filelog.packmeta() are used to decode and encode metadata for file copies and censor. An upcoming commit will move the core logic for censoring revlogs into revlog.py. This would create a cycle between revlog.py and filelog.py. So we move these metadata functions to revlog.py. .. api:: filelog.parsemeta() and filelog.packmeta() have been moved to the revlog module. Differential Revision: https://phab.mercurial-scm.org/D3150
Thu, 05 Apr 2018 15:18:23 -0700 filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Apr 2018 15:18:23 -0700] rev 37441
filelog: declare that filelog implements a storage interface Now that we have a declared interface, let's declare that filelog implements it. Tests have been added that confirm the object conforms to the interface. The existing interface checks verify there are no extra public attributes outside the declared interface. filelog has several extra attributes. So we added a mechanism to suppress this check. The goal is to modify the filelog class so we can drop this check. Differential Revision: https://phab.mercurial-scm.org/D3149
Thu, 05 Apr 2018 15:09:41 -0700 repository: define existing interface for file storage
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Apr 2018 15:09:41 -0700] rev 37440
repository: define existing interface for file storage Now that we have mostly successfully implemented an alternate storage backend for files data, let's start to define the interface for it! This commit takes the mostly-working interface as defined by the simple store repo and codifies it as the file storage interface. The interface has been split into its logical components: * index metadata * fulltext data * mutation * everything else I don't consider the existing interface to be great. But it will help to have it more formally defined so we can start chipping away at refactoring it. Differential Revision: https://phab.mercurial-scm.org/D3148
Thu, 05 Apr 2018 11:16:54 -0700 tests: run some largefiles and lfs tests with simple store
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Apr 2018 11:16:54 -0700] rev 37439
tests: run some largefiles and lfs tests with simple store Now that the simple store handles flags properly, a handful of the largefiles and lfs tests pass! Differential Revision: https://phab.mercurial-scm.org/D3147
Wed, 04 Apr 2018 21:27:02 -0700 commands: don't violate storage abstractions in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 21:27:02 -0700] rev 37438
commands: don't violate storage abstractions in `manifest --all` Previously, we asked the store to emit its data files. For modern repos, this would use fncache to resolve the set of files then would stat() each file. For my copy of the mozilla-unified repository, this took 3.3-10s depending on the state of my filesystem cache to render 449,790 items. The previous behavior was a massive layering violation because it assumed tracked files would have specific filenames in specific directories. Alternate storage backends would violate this assumption. The new behavior scans the changelog entries for the set of files changed by each commit. It aggregates them into a set and then sorts and prints the result. This reliably takes ~16.3s on my machine. ~80% of the time is spent in zlib decompression. The performance regression is unfortunate. If we want to claw it back, we can create a proper storage API to query for the set of tracked files. I'm not opposed to doing that. But I'm in no hurry because I suspect ~0 people care about the performance of `hg manifest --all`. .. perf:: `hg manifest --all` is likely slower due to changing its implementation to respect storage interface boundaries. If you are impacted by this regression in a meaningful way, please make noise on the development mailing list and it can be dealt with. Differential Revision: https://phab.mercurial-scm.org/D3119
Wed, 04 Apr 2018 21:09:47 -0700 commands: document the layering violation in `manifest --all`
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 21:09:47 -0700] rev 37437
commands: document the layering violation in `manifest --all` This commit fixes the last test failures when using the simple store extension! It turns out that `hg manifest --all` locks the repo and scans for revlogs. This feature was added by 71938479eff9 in 2011. I am debating changing the behavior. But that can occur in another commit. As part of debugging this, I realized that test-manifest.t is the only meaningful tester of `hg manifest --all` and that test was improperly disabled when bundlerepos aren't supported. The test is testing manifest behavior, not whether you can `hg pull` from a bundle. So I changed the test to `hg unbundle` instead. FWIW, I wasted a non-trivial amount of time tracking down this failure. I thought the issue involved Git, which is why I refactored the test to be more deterministic. Never in my mind would I have guessed that code in `hg manifest` would scan revlogs. I should have looked there to begin with. Doh. Differential Revision: https://phab.mercurial-scm.org/D3118
Wed, 04 Apr 2018 19:17:22 -0700 simplestore: correctly implement flag processors
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 19:17:22 -0700] rev 37436
simplestore: correctly implement flag processors There were a couple of bugs around the implementation of flags processing with the simple store. After these changes, test-flagprocessor.t now passes! test-flagprocessor.t was also updated to include explicit test coverage that pushed data is as expected on the server. The test extension used by test-flagprocessor.t has been updated so it monkeypatches the object returned from repo.file() instead of monkeypatching filelog.filelog. This allows it to work with extensions that return custom types from repo.file(). The monkeypatching is rather hacky and probably is performance prohibitive for real repos. We should probably come up with a better mechanism for registering flag processors so monkeypatching isn't needed. Differential Revision: https://phab.mercurial-scm.org/D3116
Wed, 04 Apr 2018 17:40:09 -0700 tests: `hg init` after resetting HGRCPATH
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 17:40:09 -0700] rev 37435
tests: `hg init` after resetting HGRCPATH Otherwise extensions loaded via --extra-config-opt could prevent access to the repo by introducing requirements file. This does mean that custom extensions loaded in this way won't impact this test. I'm fine with that. Differential Revision: https://phab.mercurial-scm.org/D3115
Wed, 04 Apr 2018 17:33:59 -0700 tests: work around potential repo incompatibility
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 17:33:59 -0700] rev 37434
tests: work around potential repo incompatibility test-run-tests.t invokes run-tests.py. But custom extensions providing new repo requirements may be in play and may not get inherited by the new run-tests.py. We ensure our repo is created with a vanilla config to mitigate extension-caused badness. Differential Revision: https://phab.mercurial-scm.org/D3114
Wed, 04 Apr 2018 17:29:02 -0700 tests: disable test-keyword.t with simple store
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 17:29:02 -0700] rev 37433
tests: disable test-keyword.t with simple store The keyword extension is hooking into repo.file() and defining its own filelog class. It will likely require a more formal storage interface before keywords are usable with alternate storage backends. Differential Revision: https://phab.mercurial-scm.org/D3113
Wed, 04 Apr 2018 17:12:00 -0700 tests: conditionalize test-treemanifest.t
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 17:12:00 -0700] rev 37432
tests: conditionalize test-treemanifest.t Parts of the test were assuming the use of revlogs with fnstore path encoding. Other parts of the test assumed we could create repos with different store encodings and that stream clone bundles worked. Make all of this conditional on running a revlog repo. Differential Revision: https://phab.mercurial-scm.org/D3112
Wed, 04 Apr 2018 17:02:54 -0700 tests: use unbundle in test-symlink-os-yes-fs-no.py
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 17:02:54 -0700] rev 37431
tests: use unbundle in test-symlink-os-yes-fs-no.py The test (which should probably be rewritten as a .t test - the test was initially authored in 2009 and this may have predated some test harness features allowing us to implement it as a .t test) is verifying symlink behavior with regards to working directory operations. How it pulls bundle data into a repo is not relevant. So we can switch from pull to unbundle so we can support environments where bundlerepos don't work. Differential Revision: https://phab.mercurial-scm.org/D3111
Wed, 04 Apr 2018 16:49:22 -0700 tests: disable `hg clone --stream` test with simple store
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 16:49:22 -0700] rev 37430
tests: disable `hg clone --stream` test with simple store We mass disabled stream clone tests in a previous commit. Looks like one was missed. Differential Revision: https://phab.mercurial-scm.org/D3110
Wed, 04 Apr 2018 16:47:06 -0700 tests: use `hg unbundle` in test-setdiscovery.t
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 16:47:06 -0700] rev 37429
tests: use `hg unbundle` in test-setdiscovery.t This is testing how discovery between 2 well-defined repos works, not that `hg pull` works with bundles. Switch to `hg unbundle` so it works in environments where bundlerepos aren't supported. Differential Revision: https://phab.mercurial-scm.org/D3109
Wed, 04 Apr 2018 16:41:43 -0700 tests: require revlog store for test-verify.t
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 16:41:43 -0700] rev 37428
tests: require revlog store for test-verify.t This tests is doing tons of revlog-y things. It should be possible to make verification work across multiple stores. But it will likely have to wait until we have better abstractions in place. Differential Revision: https://phab.mercurial-scm.org/D3108
Wed, 04 Apr 2018 16:32:51 -0700 tests: conditionalize test-commandserver.t based on extra extensions
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 16:32:51 -0700] rev 37427
tests: conditionalize test-commandserver.t based on extra extensions If running with extra extensions we get an output difference. Differential Revision: https://phab.mercurial-scm.org/D3107
Wed, 04 Apr 2018 16:29:19 -0700 tests: conditionalize test-bundle.t
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 16:29:19 -0700] rev 37426
tests: conditionalize test-bundle.t This test is massive and could probably be split up. This change essentially requires the revlog store for stream clone tests and support for bundlerepos for various tests operating on bundle files. Differential Revision: https://phab.mercurial-scm.org/D3106
Wed, 04 Apr 2018 16:16:42 -0700 tests: require revlog store with test-repair-strip.t
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 16:16:42 -0700] rev 37425
tests: require revlog store with test-repair-strip.t This test is doing a number of low-level things with revlogs. Mark it as requiring the revlog store. Differential Revision: https://phab.mercurial-scm.org/D3105
Wed, 04 Apr 2018 17:53:45 -0700 simplestore: back up index when adding a revision
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 17:53:45 -0700] rev 37424
simplestore: back up index when adding a revision This ensures that transaction rollback reverts the index to its previous state. This fixed a few test failures due to `hg verify` complaining about a reference to an undefined changeset revision. Differential Revision: https://phab.mercurial-scm.org/D3104
Wed, 04 Apr 2018 16:00:50 -0700 tests: disable shallow narrow tests with simple store
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 16:00:50 -0700] rev 37423
tests: disable shallow narrow tests with simple store I think these are failing because of issues with flags processing in the simple store. Let's revisit this later. Differential Revision: https://phab.mercurial-scm.org/D3103
Wed, 04 Apr 2018 15:57:49 -0700 tests: skip test-hgweb-bundle.t if we don't support bundlerepos
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 15:57:49 -0700] rev 37422
tests: skip test-hgweb-bundle.t if we don't support bundlerepos Differential Revision: https://phab.mercurial-scm.org/D3102
Wed, 04 Apr 2018 15:31:25 -0700 tests: disable test-audit-path.t with simple store
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 15:31:25 -0700] rev 37421
tests: disable test-audit-path.t with simple store The simple store is using a primitive filename encoding scheme. Many tests in this file fail. So let's disable it for now. At some point, we should support a mode where we can run tests without fnstore or dotencode and have all tests assuming use of these filename encoding mechanisms be conditional on their usage. Differential Revision: https://phab.mercurial-scm.org/D3101
Wed, 04 Apr 2018 14:43:19 -0700 tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 14:43:19 -0700] rev 37420
tests: port test-convert-filemap.t to simple store Differential Revision: https://phab.mercurial-scm.org/D3100
Wed, 04 Apr 2018 14:37:53 -0700 tests: disable test-static-http.t with simple store
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 14:37:53 -0700] rev 37419
tests: disable test-static-http.t with simple store It /should/ be possible to support repos statically hosted on HTTP servers with alternate stores. But it's more trouble than it is worth right now. Let's just disable the test. Differential Revision: https://phab.mercurial-scm.org/D3099
Wed, 04 Apr 2018 14:25:20 -0700 tests: don't drop global hgrc
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 14:25:20 -0700] rev 37418
tests: don't drop global hgrc Various tests are failing when the simple store extension is loaded because the test overrides HGRCPATH and preempts loading of extensions that were injected via --extra-config-opt. In most cases, it is acceptable to always load the global HGRCPATH. So this commit changes a couple of tests so the global HGRCPATH is still pulled in. Differential Revision: https://phab.mercurial-scm.org/D3098
Wed, 04 Apr 2018 14:11:43 -0700 verify: allow suppressing warnings about extra files
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 14:11:43 -0700] rev 37417
verify: allow suppressing warnings about extra files The verifier issues warnings when the set of files in .hg/store doesn't align with the set of files that are advertised via repo.file(f).files() for all files seen in ctx.files() changelog traversal. This logic is reasonable for a default implementation. But some stores may have extra files whose presence is harmless. Or those stores may not have the same transaction rollback semantics that unlink files as other stores. This commit adds support for disabling the warning for orphaned files. The simple store extension has been taught to set this flag. Differential Revision: https://phab.mercurial-scm.org/D3097
Wed, 04 Apr 2018 14:04:18 -0700 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 14:04:18 -0700] rev 37416
tests: conditionalize tests for various repo features Working my down the long tail of test failures due to the simple store. We're now down to 38 failures with the simple store. Differential Revision: https://phab.mercurial-scm.org/D3096
Wed, 04 Apr 2018 14:09:02 -0700 simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 14:09:02 -0700] rev 37415
simplestore: use a custom store for the simple store repo Before, we used the default store, which was based on fncache and dotencode. After attempting to port tests to work with the simple store, I realized that fncache was more trouble than it is worth. This commit implements a proper store type for the simple repo - one that isn't based off fncache. This causes a number of new test failures because of tests expecting the full fncache store filename encoding. I may extend the store format in a subsequent commit to take the filename encoding parts of fncache that we can take (basically everything except hash encoding, since that isn't reversible). But for now, let's use encoded store. As part of this, we implement proper requirements support for repos created with the simple store. This should have been done from the beginning, as a requirement is needed to lock out clients that don't understand a storage format. A new hghave feature advertising the presence of fncache in repos has been added. Most tests touching the fncache are now conditional on that feature. Other tests have added the optional repo requirement to output. Differential Revision: https://phab.mercurial-scm.org/D3095
Tue, 27 Feb 2018 02:37:31 +0100 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de> [Tue, 27 Feb 2018 02:37:31 +0100] rev 37414
wireproto: allow direct stream processing for unbundle Introduce a new option server.streamunbundle which starts a transaction immediately to apply a bundle instead of writing it to a temporary file first. This side steps the need for a large tmp directory at the cost of preventing concurrent pushes. This is a reasonable trade-off for many setups as concurrent pushes for the main branch at least are disallowed anyway. The option defaults to off to preserve existing behavior. Change the wireproto interface to provide a generator for reading the payload and make callers responsible for consuming all data. Differential Revision: https://phab.mercurial-scm.org/D2470
Fri, 06 Apr 2018 22:22:19 +0200 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de> [Fri, 06 Apr 2018 22:22:19 +0200] rev 37413
wireproto: send server capabilities in canonical order Differential Revision: https://phab.mercurial-scm.org/D3171
Fri, 06 Apr 2018 22:16:11 +0200 wireproto: don't special case bundlecaps, but sort all scsv arguments
Joerg Sonnenberger <joerg@bec.de> [Fri, 06 Apr 2018 22:16:11 +0200] rev 37412
wireproto: don't special case bundlecaps, but sort all scsv arguments Differential Revision: https://phab.mercurial-scm.org/D3170
Fri, 06 Apr 2018 21:50:01 +0200 wireproto: turn client capabilities into sets, sorted on the wire
Joerg Sonnenberger <joerg@bec.de> [Fri, 06 Apr 2018 21:50:01 +0200] rev 37411
wireproto: turn client capabilities into sets, sorted on the wire Differential Revision: https://phab.mercurial-scm.org/D3169
Wed, 04 Apr 2018 13:43:52 -0700 verify: drop "revlog" from warning message
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 13:43:52 -0700] rev 37410
verify: drop "revlog" from warning message Not all stores may be backed by revlogs. Switch to a more generic error message. Differential Revision: https://phab.mercurial-scm.org/D3094
Wed, 04 Apr 2018 10:16:08 -0700 store: make file filtering during walk configurable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 10:16:08 -0700] rev 37409
store: make file filtering during walk configurable Previously, the walking mechanism assumed the use of revlogs for storage. Making the file filter configurable will enable custom stores to override _walk() so it recognizes additional files. Differential Revision: https://phab.mercurial-scm.org/D3093
Wed, 04 Apr 2018 09:31:19 -0700 simplestore: shore up lookup errors
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 09:31:19 -0700] rev 37408
simplestore: shore up lookup errors When revisions or nodes can't be resolved, we're expected to raise an error.LookupError. When I ported code from revlog.py, I failed to realize that "LookupError" in that module is aliased to error.LookupError. I thought we were using the builtin LookupError instead. This commit switches us to error.LookupError. It also fixes rev() to raise error.LookupError instead of KeyError. Differential Revision: https://phab.mercurial-scm.org/D3092
Wed, 04 Apr 2018 09:57:21 -0700 tests: extract dumprevlog tests to own file
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 09:57:21 -0700] rev 37407
tests: extract dumprevlog tests to own file And mark the test as requiring the revlog store. Differential Revision: https://phab.mercurial-scm.org/D3091
Wed, 04 Apr 2018 09:21:11 -0700 tests: skip test-censor.t when using simple store
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 09:21:11 -0700] rev 37406
tests: skip test-censor.t when using simple store Censor assumes the use of revlogs. Proper censor support for non-revlog storage will require a better abstraction in the storage layer to remove data. Let's skip the censor tests until we have something in place. Differential Revision: https://phab.mercurial-scm.org/D3090
Mon, 02 Apr 2018 21:54:12 +0900 templater: deduplicate iterator of overlay mappings
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 21:54:12 +0900] rev 37405
templater: deduplicate iterator of overlay mappings
Sun, 18 Mar 2018 21:01:23 +0900 templater: complain about invalid application of '%' operator (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 21:01:23 +0900] rev 37404
templater: complain about invalid application of '%' operator (BC) Before, '{x % y % z ...}' was silently evaluated as '{x % y}'. We no longer need this hack since the web template bugs was fixed by earlier patches. At this point, the error message may contain '<generator *>', which will be fixed later.
Sun, 18 Mar 2018 21:18:57 +0900 hgweb: fix type of {nav} keyword when linerange filter is active
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 21:18:57 +0900] rev 37403
hgweb: fix type of {nav} keyword when linerange filter is active Spotted by making '%' operator check the operand type more strictly. Before, "{nav}" would be evaluated to a lazy "" (empty string) and {"" % x} would yield one empty string.
Sun, 18 Mar 2018 21:46:20 +0900 hgweb: fix {diff} expansion in JSON template
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 21:46:20 +0900] rev 37402
hgweb: fix {diff} expansion in JSON template The same sort of bug as the previous patch. In this case, I decided to fix the JSON template since we aren't ready to fix the {diff} keyword without BC. I'll rework it later.
Sun, 18 Mar 2018 21:35:43 +0900 hgweb: fix summary {tags} and {shortlog} to not forcibly expand template
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 21:35:43 +0900] rev 37401
hgweb: fix summary {tags} and {shortlog} to not forcibly expand template The same sort of bug as the previous patch. In this case, JSON template was wrong.
Sun, 18 Mar 2018 20:51:39 +0900 hgweb: fix search {entries} to not return results of template expansion
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 20:51:39 +0900] rev 37400
hgweb: fix search {entries} to not return results of template expansion "{entries%changelogentry}" in raw/search.tmpl was utterly wrong because "{entries}" here was a generator yielding results of template expansion. That's why we have a weird hack in runmap(), which I'm going to get rid of. https://www.mercurial-scm.org/repo/hg/file/4.5.2/mercurial/templater.py#l469 We have two choices: a) drop "%changelogentry" from raw/search.tmpl b) fix "{entries}" to yield mappings I take (b) because that's what the other log-like "{entries}" do. The "entries" keyword is wrapped by mappinggenerator so "{entries}" without "%searchentry" still works.
Sat, 17 Mar 2018 22:47:02 +0900 templater: add class representing a nested mappings
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 22:47:02 +0900] rev 37399
templater: add class representing a nested mappings The mappinggenerator class is necessary to fix hgweb bugs without BC. The mappinglist is for nested formatter items. They are similar, so factored out the base class. The mappinglist could be implemented by using the mappinggenerator, but we'll probably need a direct access to the raw list, so they are implemented as separate classes. Note that tovalue() isn't conforming to the spec yet in that it may return a list of dicts containing unprintable resources. This problem will be fixed later. Tests will be added by subsequent patches.
Sat, 17 Mar 2018 22:56:49 +0900 templater: add function that expands internal literal templates
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 22:56:49 +0900] rev 37398
templater: add function that expands internal literal templates This will be used when rendering nested formatter items with the default template, e.g. fm.nested('parents', tmpl='{rev}:{node|formatnode}', sep=' ') ^^^^^^^^^^^^^^^^^^^^^^^ the default item template
Fri, 06 Apr 2018 11:28:26 -0700 bookmarks: use isrevsymbol() for detecting collision with existing symbol
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 11:28:26 -0700] rev 37397
bookmarks: use isrevsymbol() for detecting collision with existing symbol Differential Revision: https://phab.mercurial-scm.org/D3167
Fri, 06 Apr 2018 11:26:50 -0700 debugwhyunstable: add support for revsets
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 11:26:50 -0700] rev 37396
debugwhyunstable: add support for revsets Differential Revision: https://phab.mercurial-scm.org/D3166
Fri, 06 Apr 2018 10:46:24 -0700 convert: look up branch only among branches
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 10:46:24 -0700] rev 37395
convert: look up branch only among branches repo[<branch name>] can find something that's not a branch, which is not good. Differential Revision: https://phab.mercurial-scm.org/D3161
Thu, 05 Apr 2018 16:10:52 -0700 convert: remove unused/unnecessary variable "parentctx"
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 16:10:52 -0700] rev 37394
convert: remove unused/unnecessary variable "parentctx" Differential Revision: https://phab.mercurial-scm.org/D3160
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip