Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:55 +0100] rev 43572
perf: make `perfrevlogindex` use the new `index.rev` api if available
Differential Revision: https://phab.mercurial-scm.org/D7360
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43571
perf: make `perfnodemap` use the new `index.get_rev` api if available
Differential Revision: https://phab.mercurial-scm.org/D7358
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43570
index: use `index.get_rev` in `remotefilelog`
Differential Revision: https://phab.mercurial-scm.org/D7357
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43569
index: use `index.get_rev` in `histedit.processreplacement`
Differential Revision: https://phab.mercurial-scm.org/D7354
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43568
index: use `index.get_rev` in `histedit.adjustreplacementsfrommarkers`
Differential Revision: https://phab.mercurial-scm.org/D7353
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43567
index: use `index.get_rev` in `rebase._computeobsoletenotrebased`
Differential Revision: https://phab.mercurial-scm.org/D7350
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43566
index: use `index.get_rev` in `rebase.successorrevs`
The code is slightly updated in the process for simplicity.
Differential Revision: https://phab.mercurial-scm.org/D7349
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43565
index: use `index.get_rev` in `unionrepo.unionrevlog`
Differential Revision: https://phab.mercurial-scm.org/D7338
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43564
index: use `index.rev` in `bundlerepo.bundlerevlog`
Differential Revision: https://phab.mercurial-scm.org/D7340
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43563
index: use `index.get_rev` in `exchange._pullapplyphases`
Differential Revision: https://phab.mercurial-scm.org/D7347
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43562
index: use `index.rev` in `exchange.fallbackheads`
Differential Revision: https://phab.mercurial-scm.org/D7345
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43561
index: use `index.get_rev` in `revset._mapbynodefunc`
We slightly update the code in the process.
Differential Revision: https://phab.mercurial-scm.org/D7343
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43560
index: use `index.get_rev` in `discovery._postprocessobsolete`
Differential Revision: https://phab.mercurial-scm.org/D7341
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43559
index: use `index.get_rev` in `repoview.pinnedrevs`
We simplify the code in the process
Differential Revision: https://phab.mercurial-scm.org/D7337
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43558
index: use `index.get_rev` in `obsolete._computephasedivergentset`
Differential Revision: https://phab.mercurial-scm.org/D7336
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43557
index: use `index.get_rev` in `obsutil.getobsoleted`
Differential Revision: https://phab.mercurial-scm.org/D7335
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43556
index: use `index.get_rev` in `phases.newheads`
Differential Revision: https://phab.mercurial-scm.org/D7332
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:51 +0100] rev 43555
index: use `index.get_rev` in `localrepo.known`
Differential Revision: https://phab.mercurial-scm.org/D7327
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:51 +0100] rev 43554
index: add a `get_rev` method (API)
The new `index.getrev(node)` is to be preferred over using:
`index.nodemap.get(node)`.
This get us closer to be able to remove the `nodemap` attribute of the index.
Differential Revision: https://phab.mercurial-scm.org/D7326
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:51 +0100] rev 43553
index: use `index.rev` in `revlog.rev`
Differential Revision: https://phab.mercurial-scm.org/D7325
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:51 +0100] rev 43552
index: add a `rev` method (API)
The new `index.rev(node)` is to be preferred over using `node
index.nodemap[node]`.
This get us closer to be able to remove the `nodemap` attribute of the index.
Differential Revision: https://phab.mercurial-scm.org/D7324
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:26:55 +0100] rev 43551
perf: make `perfphasesremote` use the new `index.has_node` api
(If available)
Differential Revision: https://phab.mercurial-scm.org/D7359
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 17:08:24 +0100] rev 43550
index: use `index.has_node` in `infinitypush`
Differential Revision: https://phab.mercurial-scm.org/D7356
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:26:33 +0100] rev 43549
index: use `index.has_node` in `phabricator.getoldnodedrevmap`
Differential Revision: https://phab.mercurial-scm.org/D7355
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 15:09:09 +0100] rev 43548
index: use `index.has_node` in `histedit.cleanupnode`
Differential Revision: https://phab.mercurial-scm.org/D7352
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 15:08:27 +0100] rev 43547
index: use `index.has_node` in `histedit._finishhistedit
Differential Revision: https://phab.mercurial-scm.org/D7351
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:25:25 +0100] rev 43546
index: use `index.has_node` in `exchangev2._pullchangesetdiscovery`
Differential Revision: https://phab.mercurial-scm.org/D7348
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 16:00:47 +0100] rev 43545
index: use `index.has_node` in `exchange._pulldiscoverychangegroup`
Differential Revision: https://phab.mercurial-scm.org/D7346
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:36:02 +0100] rev 43544
index: use `index.has_node` in `bookmarks.bmstore`
Differential Revision: https://phab.mercurial-scm.org/D7344
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 11:44:23 +0100] rev 43543
index: use `index.has_node` in `tags.findglobaltags`
Differential Revision: https://phab.mercurial-scm.org/D7342
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:24:54 +0100] rev 43542
index: use `index.has_node` in `bundlerepo.bundlerevlog`
Differential Revision: https://phab.mercurial-scm.org/D7339
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:20:48 +0100] rev 43541
index: use `index.has_node` in `obsutil.foreground`
Differential Revision: https://phab.mercurial-scm.org/D7334
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:19:53 +0100] rev 43540
index: use `index.has_node` in `obsutil.exclusivemarkers`
Differential Revision: https://phab.mercurial-scm.org/D7333
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:17:03 +0100] rev 43539
index: use `index.has_node` in `phases.filterunknown`
Differential Revision: https://phab.mercurial-scm.org/D7331
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:16:24 +0100] rev 43538
index: use `index.has_node` in `analyzeremotephases`
Differential Revision: https://phab.mercurial-scm.org/D7330
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:00:22 +0100] rev 43537
index: use `index.has_node` in `repo._rollback`
Differential Revision: https://phab.mercurial-scm.org/D7329
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Nov 2019 00:49:55 +0100] rev 43536
index: use `index.has_node` in `revlog.addgroup`
Differential Revision: https://phab.mercurial-scm.org/D7328
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Nov 2019 00:05:20 +0100] rev 43535
index: use `index.has_node` in `revlog.addrevision`
Differential Revision: https://phab.mercurial-scm.org/D7323
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Nov 2019 00:01:09 +0100] rev 43534
index: add a `has_node` method (API)
The new `index.has_node(node)` is to be preferred over:
`node in index.nodemap`.
This get us closer to be able to remove the `nodemap` attribute of the index.
Differential Revision: https://phab.mercurial-scm.org/D7322
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 05:54:22 +0100] rev 43533
revlog: deal with nodemap deletion within the index
Since the nodemap data now live in the index, it should be the index
responsibility to ensure the data are up to date.
The C version of the index is already dealing with such deletion.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7321
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 10:01:10 +0100] rev 43532
revlog: clean up the node of all revision stripped in the C code
For some obscure reason, the loop cleaning up node was skipping the first
element… I cannot see a reason for it. The overall code is running fine
nevertheless because the node are also explicitly deleted from python.
We want to delete this explicit deletion, so we need to fix that code first.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7320
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Nov 2019 00:15:12 +0100] rev 43531
revlog: move nodemap update within the index code
Since the nodemap data now live in the index, it should be the index
responsibility to ensure the data are up to date.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7319
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Nov 2019 15:46:47 +0100] rev 43530
revlog: deprecate the _nodecache attribute (API)
This attribute have been the same object for a long time. Code should directly
access the nodemap in case of need. (Or the final API when this will be done).
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7318
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Nov 2019 15:25:31 +0100] rev 43529
revlog: access the nodemap through the index
The `revlog.rev` method now access the nodemap through `self.index.nodemap`,
instead of using the `_nodecache` attribute that we are trying to remove.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7317
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Nov 2019 15:21:28 +0100] rev 43528
revlog: return the nodemap as the nodecache
Ultimately, the nodecache is the nodemap. To stop having this disctinction, we
start using the nodemap where the nodecache was used.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7316
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Nov 2019 14:45:57 +0100] rev 43527
revlog: clarify which version use the older API in perf
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7315
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2019 14:13:19 +0100] rev 43526
revlog: no longer return the nodemap after parsing
Now that both pure and cext version have a `nodemap` attribute, we do not need
to return the `nodemap` object after parsing.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7314
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2019 14:13:19 +0100] rev 43525
revlog: move the nodemap into the index object (for pure)
This make the pure code closer to the C extension one. The ultimate goal is to
merge the two into a single object and offer a unified API. This changeset
focus on gathering the data on the same object.
For now the code for `revlogoldindex` and `BaseIndexObject` index object are
quite similar. However, there will be larger divergence later on, so I don't
think is worth doing a base case.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7313
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2019 14:13:19 +0100] rev 43524
revlog: introduce an explicit NodeMap class for pure code
This class make the "pure" nodemap raise the same exception than the C-extension
one.
This is a step toward unifying nodemap and index, the class is not meant to
survive on the long run.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
There is a new `isinstance` call, it will be cleaned up in coming changesets.
Differential Revision: https://phab.mercurial-scm.org/D7312
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2019 14:13:19 +0100] rev 43523
utils: move the `dirs` definition in pathutil (API)
Before this change, the `dirs` class was accessible through the `mercurial.util`
module. That module is expected to stay free of scm specific content.
The `pathutil` destination has been selection by Martin von Zweigbergk.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7311
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 12:15:42 -0700] rev 43522
packaging: stop installing i18n files
The WiX installer has been shipping the content of the i18n/
directory since it was introduced in 2010 in
1e022c88a0a5.
And the installer was subsequently refactored to only ship
the .po files and hggettext.
The .po files and the hggettext script are only used at build
time to produce .mo files, which Mercurial does use at run-time.
It doesn't make sense to install these files on Windows. So
this commit stops doing that.
This change further converges the file layout of the Inno and
WiX installers.
Differential Revision: https://phab.mercurial-scm.org/D7165
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 11:54:22 -0700] rev 43521
packaging: install hgk as hgk.tcl
Giving it a file extension will give Windows a better chance
at being able to execute it via standard means. This also
makes WiX consistent with the Inno installer.
Differential Revision: https://phab.mercurial-scm.org/D7164
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 12:01:31 -0700] rev 43520
packaging: add logo-droplets.svg
The WiX installer adds this file. Let's add it to the
Inno installer for consistency.
Differential Revision: https://phab.mercurial-scm.org/D7163
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 11:40:59 -0700] rev 43519
packaging: install documentation to doc/ directory
The source directory is "doc" and "doc" is used by the WiX
installer. I think it makes sense to converge on the canonical
path name. While we're here, we also lower the case because
we can. (I think lower case names make more sense plus it is
more consistent.)
This only affects the Inno installer at the moment because
it is the only installer using the staging code.
Differential Revision: https://phab.mercurial-scm.org/D7162
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 22 Oct 2019 18:34:03 -0700] rev 43518
packaging: always pass VERSION into Inno invocation
The code in the Inno file was a holdover from before we had
Python driving execution.
With Python in the driver's seat, we can now have it resolve
the version string and pass it into Inno, making the code
easier to understand for people who aren't packaging gurus.
Differential Revision: https://phab.mercurial-scm.org/D7161
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 24 Oct 2019 21:22:08 -0700] rev 43517
packaging: remove hg.exe.local file
<exe>.local files are used by Windows to set up DLL
redirection. But these files are ignored if you embed an
application manifest in your binary, which we do.
So the existence of this file serves no purpose. So we remove
it.
Differential Revision: https://phab.mercurial-scm.org/D7160
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:39:28 -0700] rev 43516
packaging: stage installed files for Inno
Previously, the Inno installer maintained its own mapping of
source files to install location. (We have to maintain a
similar mapping in the WiX installer.)
Managing the explicit file layout for Windows packages is
cumbersome and redundant. Every time you want to change the
layout you need to change N locations. We frequently forget
to do this and we only find out when people install Mercurial
from our packages at release time.
This commit starts the process of consolidating and simplifying
the logic for managing the install layout on Windows.
We introduce a list of install layout rules. These are simply
source filenames (which can contain wildcards) and destination
paths.
The Inno packaging code has been updated to assemble all
files into a staging directory that mirrors the final install
layout. The list of files to add to the installer is derived
by walking this staging directory and dynamically emitting
the proper entries for the Inno Setup script.
I diffed the file layout before and after this commit and
there is no difference.
Another benefit of this change is that it facilitates easier
testing of the Windows install layout. Before, in order to
test the final install layout, you needed to build an installer
and run it. Now, you can stage files into the final layout
and test from there, without running the installer. This
should cut down on overhead when changing Windows code.
Differential Revision: https://phab.mercurial-scm.org/D7159
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:39:17 -0700] rev 43515
packaging: process Inno Setup files with Jinja2
I want to make the Inno Setup files dynamically generated.
This will enable us to do things like automatically derive the
set of files to be packaged instead of having to manually
keep lists of files in sync across installers.
As the first step towards this, we process the Inno Setup
files with Jinja2.
As part of this conversion, we had to escape syntax in
mercurial.iss that conflicts with Jinja2. I also took the
opportunity to include modpath.iss via Jinja2 instead of
using Inno's preprocessor. This keeps the Python code a
bit simpler.
Differential Revision: https://phab.mercurial-scm.org/D7158
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:39:08 -0700] rev 43514
packaging: install and run Inno files in a build directory
Upcoming commits will refactor the Windows installers so their
content is dynamically derived. In preparation for this, we
copy the Inno files into a new build directory and run them
from there. This required changing some relative paths to
work from a new directory level but is otherwise a pretty
straightforward change.
Differential Revision: https://phab.mercurial-scm.org/D7157
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:37:36 -0700] rev 43513
packaging: consolidate CLI functionality into packaging.py
Consolidating functionality for invoking code in the hgpackaging
package through a single CLI entry point will make things simpler
when we add more complexity to that package. For example, it will
allow us to run things out of a virtualenv with third party
packages.
This commit consolidates functionality from the Inno and WiX
build.py scripts into a new packaging.py script. That script
simply creates a virtualenv and runs the CLI functionality in
it.
The new virtualenv is populated with jinja2 because I felt
it easier to incorporate requirements file processing in this
commit and we will soon use jinja2 in an upcoming commit.
The unified CLI functionality will also make it easier to
script other packaging workflows going forward. e.g. RPM, Debian,
and macOS packaging.
Differential Revision: https://phab.mercurial-scm.org/D7156