Fri, 17 Aug 2018 23:28:37 -0400 tests: demonstrate an inconsistency when cloning to a missing directory tree
Matt Harbison <matt_harbison@yahoo.com> [Fri, 17 Aug 2018 23:28:37 -0400] rev 39184
tests: demonstrate an inconsistency when cloning to a missing directory tree I noticed that `hg share` is unable to create more than one missing directory on the path, and thought it was inconsistent with clone. It turns out that the path for copying/linking the remote store has the same limitation, but cloning from a remote repo doesn't.
Sat, 18 Aug 2018 23:39:26 -0400 tests: stabilize test-merge-tools.t on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 18 Aug 2018 23:39:26 -0400] rev 39183
tests: stabilize test-merge-tools.t on Windows More fun with `hg import --bypass` to work around Windows limitations. The diffs were generated on Linux, and had a tab to terminate the `+++b/...` lines. But check-code complained about trailing whitespace, and it seems to run without them.
Fri, 17 Aug 2018 21:26:34 +0000 dagutil: remove module
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 21:26:34 +0000] rev 39182
dagutil: remove module The previous commit removed the last consumer of this module. .. api:: dagutil module has been removed Some functionality has been moved to the dagop module. Other functionality can be accomplished via revsets. Differential Revision: https://phab.mercurial-scm.org/D4330
Fri, 17 Aug 2018 21:21:50 +0000 dagop: port revlogdag.linearize() to standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 21:21:50 +0000] rev 39181
dagop: port revlogdag.linearize() to standalone function The code should functionally be identical. We also port the one consumer in changegroup to use the new standalone function. After this commit, dagutil is no longer used! Differential Revision: https://phab.mercurial-scm.org/D4329
Fri, 17 Aug 2018 19:48:52 +0000 dagutil: use revlog.parentrevs() for resolving parent revisions
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 19:48:52 +0000] rev 39180
dagutil: use revlog.parentrevs() for resolving parent revisions And remove parents() since it is no longer used. revlog.parentrevs() is almost the same as parents(). The main difference is that parentrevs() can return nullrev. dagop.headrevs() already handles nullrev. We add an inline check for nullrev in the other call site to account for the difference. .. api:: parents() removed from dagutil classes Use parentrevs() on the storage object instead. Differential Revision: https://phab.mercurial-scm.org/D4328
Fri, 17 Aug 2018 19:45:13 +0000 dagop: extract headsetofconnecteds() from dagutil
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 19:45:13 +0000] rev 39179
dagop: extract headsetofconnecteds() from dagutil The functionality for resolving the set of DAG heads from a subset simply requires a function to resolve parent revisions. Let's establish a function in the dagop module to do this, which seems to be where generic DAG functionality goes these days. Differential Revision: https://phab.mercurial-scm.org/D4327
Fri, 17 Aug 2018 19:35:24 +0000 setdiscovery: precompute children revisions to avoid quadratic lookup
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 19:35:24 +0000] rev 39178
setdiscovery: precompute children revisions to avoid quadratic lookup Moving away from dagutil a few commits ago introduced quadratic behavior when resolving children revisions during discovery. This commit introduces a precompute step of the children revisions to avoid the bad behavior. I believe the new code should have near identical performance to what dagutil was doing before. Behavior is still slightly different because we take into account filtered revisions. But this change was made when we moved off dagutil. I added a comment about multiple invocations of this function redundantly calculating the children revisions. I believe this potentially undesirable behavior was present when we used dagutil, as the call to inverse() previously in this function created a new object and required computing children on every invocation. I thought we should document the potential for a performance issue rather than let it go undocumented. Differential Revision: https://phab.mercurial-scm.org/D4326
Fri, 17 Aug 2018 19:24:36 +0000 dagutil: remove unused classes
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 19:24:36 +0000] rev 39177
dagutil: remove unused classes We only directly use revlogdag in changegroup code. We don't need all this abstraction. So remove various classes and levels of inheritance. Differential Revision: https://phab.mercurial-scm.org/D4325
Fri, 17 Aug 2018 18:23:47 +0000 setdiscovery: use revset for resolving DAG heads in a subset
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 18:23:47 +0000] rev 39176
setdiscovery: use revset for resolving DAG heads in a subset This was the final use of dagutil in setdiscovery! For reasons I didn't investigate, feeding a set with nullrev into the heads() revset resulted in a bunch of tests failing. Filtering out nullrev from the input set fixes things. Differential Revision: https://phab.mercurial-scm.org/D4324
Fri, 17 Aug 2018 19:12:25 +0000 dagutil: remove ability to invert instances
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 19:12:25 +0000] rev 39175
dagutil: remove ability to invert instances The previous commit removed the last consumer of this feature. .. api:: remove inverse() methods from classes in dagutil Differential Revision: https://phab.mercurial-scm.org/D4323
Fri, 17 Aug 2018 18:22:10 +0000 setdiscovery: don't use dagutil for parent resolution
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 18:22:10 +0000] rev 39174
setdiscovery: don't use dagutil for parent resolution _updatesample()'s one remaining use of revlogdag is for resolving the parents of a revision. In 2 cases, we actually resolve parents. In 1, we operate on the inverted DAG and resolve children. This commit teaches _updatesample() to receive an argument defining the function to resolve "parent" revisions. Call sites pass in changelog.parentrevs() or a wrapper around changelog.children() accordingly. The use of children() is semantically correct. But it is quadratic, since revlog.children() does a range scan over all revisions starting at its input and effectively calls parentrevs() to build up the list of children. So calling it repeatedly in a loop is a recipe for bad performance. I will be implementing something better in a subsequent commit. I wanted to get the porting off of dagutil done in a way that was simple and correct. Like other patches in this series, this change is potentially impacted but revlogdag's ignorance of filtered revisions. The new code is filtering aware, since changelog's revs() (used by children() will skip filtered revisions and therefore hidden children won't appear. This is potentially backwards incompatible. But no tests fail and I think this code should respect visibility. Differential Revision: https://phab.mercurial-scm.org/D4322
Fri, 17 Aug 2018 18:05:36 +0000 setdiscovery: use revsets for computing a subset's heads and roots
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 18:05:36 +0000] rev 39173
setdiscovery: use revsets for computing a subset's heads and roots revlogdag.headsetofconnecteds() obtains the set of DAG heads in a given set of revs. revlogdag.inverse() inverts the DAG order and makes headsetofconnecteds() obtain the DAG roots in a given subset. Both of these can be expressed with a revset. Like other patches in this series, revlogdag uses revlog.index and thus doesn't take filtering into account. Revsets do. So there is a chance for regressions with this change. But no tests fail. And I think this code should take filtering into account since hidden changesets shouldn't factor into discovery (unless operating on the hidden repository). Differential Revision: https://phab.mercurial-scm.org/D4321
Fri, 17 Aug 2018 17:59:16 +0000 dagutil: remove heads() and localsubset from revlogdag.__init__
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 17:59:16 +0000] rev 39172
dagutil: remove heads() and localsubset from revlogdag.__init__ The previous commit removed the last consumer of this API. I'm not going to mark as API incompatible because I doubt anybody used this functionality (outside of possibly passing an argument to revlogdag.__init__). I intend to remove revlogdag later in this series and its API annotation will cover this one. Differential Revision: https://phab.mercurial-scm.org/D4320
Fri, 17 Aug 2018 17:54:10 +0000 setdiscovery: pass head revisions into sample functions
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 17:54:10 +0000] rev 39171
setdiscovery: pass head revisions into sample functions This eliminates the last remaining consumer of heads() and related functionality in dagutil. Differential Revision: https://phab.mercurial-scm.org/D4319
Fri, 17 Aug 2018 17:48:15 +0000 setdiscovery: pass heads into _updatesample()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 17:48:15 +0000] rev 39170
setdiscovery: pass heads into _updatesample() In preparation for eliminating the use of dagutil. Since _takefullsample() operates on the inverted DAG, it is easier to have the caller pass in the relevant set instead of teaching _updatesample() about when to invert the DAG. We keep the logic identical for now: future commits will remove dagutil. Differential Revision: https://phab.mercurial-scm.org/D4318
Fri, 17 Aug 2018 17:26:07 +0000 setdiscovery: use a revset for finding DAG heads in a subset
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 17:26:07 +0000] rev 39169
setdiscovery: use a revset for finding DAG heads in a subset The march towards moving away from dagutil continues. Like other patches moving us away from dagutil, there is the potential for regressions to occur because revlogdag's headsetofconnecteds() uses revlog.index, which doesn't take filtering into account. The revset layer does. But no tests fail, so we appear to be in the clear. Differential Revision: https://phab.mercurial-scm.org/D4317
Fri, 17 Aug 2018 17:21:11 +0000 setdiscovery: reflect use of revs instead of nodes
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 17:21:11 +0000] rev 39168
setdiscovery: reflect use of revs instead of nodes This code all operates on revision numbers. Update variable names and comments accordingly. Differential Revision: https://phab.mercurial-scm.org/D4316
Fri, 17 Aug 2018 17:15:09 +0000 dagutil: remove descendantset() and ancestorset()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 17:15:09 +0000] rev 39167
dagutil: remove descendantset() and ancestorset() descendantset() is unused after the previous commit. And ancestorset() was only used by descendantset(), so it can be removed as well. .. api:: descendantset() and ancestorset() removed from dagutil Use a revset instead when operating on the changelog. Or use various functionality in the ancestor or dagop modules. Differential Revision: https://phab.mercurial-scm.org/D4315
Fri, 17 Aug 2018 17:13:26 +0000 setdiscovery: use a revset instead of dagutil.descendantset()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Aug 2018 17:13:26 +0000] rev 39166
setdiscovery: use a revset instead of dagutil.descendantset() This is the only use of descendantset() in the repo. Strictly speaking, the revset behaves slightly differently than dagutil. The reason is that dagutil is using revlog.index for DAG traversal and this data structure isn't aware of visibility / filtering. So it can operate on revisions it shouldn't operate on. But our test coverage of this code is pretty comprehensive and this change causes no tests to fail. So I think we are good. Also, the revset parser failed to parse `%ld:: - %ld::`, hence the use of descendants(). I'm not sure if that is a feature or a bug. Differential Revision: https://phab.mercurial-scm.org/D4314
Thu, 16 Aug 2018 20:23:10 +0000 setdiscovery: don't use dagutil to compute heads
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Aug 2018 20:23:10 +0000] rev 39165
setdiscovery: don't use dagutil to compute heads This is a relatively trivial operation to perform. We don't need to use dagutil. This brings us one step closer to eliminating dagutil. We still need to populate the heads on revlogdag because later functionality relies on it. Differential Revision: https://phab.mercurial-scm.org/D4310
Thu, 16 Aug 2018 20:11:45 +0000 dagutil: remove nodeset()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Aug 2018 20:11:45 +0000] rev 39164
dagutil: remove nodeset() AFAICT this was unused since the code was introduced by cb98fed52495 in 2011! Differential Revision: https://phab.mercurial-scm.org/D4309
Thu, 16 Aug 2018 19:55:55 +0000 debugcommands: use a revset instead of dagutil
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Aug 2018 19:55:55 +0000] rev 39163
debugcommands: use a revset instead of dagutil All this code was doing was finding the nodes that are heads from the ancestors of an input set. This can easily be expressed with a revset without having to go through dagutil. This was the last use of ancestorset() outside of dagutil itself. Differential Revision: https://phab.mercurial-scm.org/D4308
Thu, 16 Aug 2018 19:51:01 +0000 dagutil: remove internalize() and internalizeall()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Aug 2018 19:51:01 +0000] rev 39162
dagutil: remove internalize() and internalizeall() The previous commit removed the last consumer. .. api:: removed internalize() and internalizeall() from dagutil Use .rev(node) on storage objects to convert nodes to revisions. Differential Revision: https://phab.mercurial-scm.org/D4307
Thu, 16 Aug 2018 19:47:30 +0000 setdiscovery: don't use dagutil for node -> rev conversion
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Aug 2018 19:47:30 +0000] rev 39161
setdiscovery: don't use dagutil for node -> rev conversion The node -> rev conversion is possible using standard storage APIs and doesn't need to involve the dagutil module. Differential Revision: https://phab.mercurial-scm.org/D4306
Thu, 16 Aug 2018 19:40:46 +0000 dagutil: remove externalize() and externalizeall()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Aug 2018 19:40:46 +0000] rev 39160
dagutil: remove externalize() and externalizeall() They are unused after the previous commit. .. api:: externalize() and externalizeall() removed from dagutil Use .node() on a storage primitive to perform revision to node conversions. Differential Revision: https://phab.mercurial-scm.org/D4305
Thu, 16 Aug 2018 19:39:47 +0000 setdiscovery: don't use dagutil for rev -> node conversions
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Aug 2018 19:39:47 +0000] rev 39159
setdiscovery: don't use dagutil for rev -> node conversions We don't need to use dagutil to perform a simple rev -> node conversion. I haven't measured, but the new code is likely faster, as we avoid extra function calls and avoid some attribute lookups. Differential Revision: https://phab.mercurial-scm.org/D4304
Thu, 16 Aug 2018 19:23:24 +0000 exchange: don't use dagutil
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Aug 2018 19:23:24 +0000] rev 39158
exchange: don't use dagutil We were only using it for simple node -> rev and parent revision lookups. These are exposed via the storage interface and we don't need to go through dagutil. Differential Revision: https://phab.mercurial-scm.org/D4303
Fri, 20 Jul 2018 13:20:01 +0200 revlog: only consider the span of the delta section
Paul Morelle <paul.morelle@octobus.net> [Fri, 20 Jul 2018 13:20:01 +0200] rev 39157
revlog: only consider the span of the delta section Since the number of snapshots is limited we can exclude them from the logic checking size and number of reads. Limiting the span computation to the delta section will allow for further optimization.
Mon, 23 Jul 2018 16:21:58 +0200 revlog: ensure intermediate snapshot have decreasing size
Boris Feld <boris.feld@octobus.net> [Mon, 23 Jul 2018 16:21:58 +0200] rev 39156
revlog: ensure intermediate snapshot have decreasing size If the intermediate snapshot is bigger than the previous one, there is likely a better snapshot to be made at a different level.
Wed, 07 Mar 2018 12:28:04 +0100 revlog: bound number of snapshots in a chain
Paul Morelle <paul.morelle@octobus.net> [Wed, 07 Mar 2018 12:28:04 +0100] rev 39155
revlog: bound number of snapshots in a chain To limit the number of snapshot chained, we enforce them to be smaller and smaller. This guarantee the number of snapshot in a chain will be bounded to a small number.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip