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
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
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
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.
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
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.
Yuya Nishihara <yuya@tcha.org> [Thu, 15 Mar 2018 22:27:16 +0900] rev 37500
formatter: make nested items somewhat readable in template output
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().
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
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