Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 13:55:12 -0700] rev 43654
packaging: use lower case for RC files
The file case doesn't matter. I'm not sure why it is
capitalized.
This is a source of inconsistency between Inno and WiX.
So let's standardize on the lower case names.
The MSI should remove the old files before installing
the new one, so there shouldn't be a problem with a case
collision.
And, users should not have modified these files, so it
should be safe to rename them.
Differential Revision: https://phab.mercurial-scm.org/D7172
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:42:19 -0700] rev 43653
packaging: write out editor.rc in Python
Let's dynamically generate the file from Python instead of
relying on Inno functionality, as that will give more
visibility into what's going on.
I spotted this as part of converging the install layout
of Inno and WiX: the former doesn't install an editor.rc
and instead defines the editor via its mercurial.rc file.
We will change the behavior of WiX later once it is consuming
the staged install directory for packaging.
Differential Revision: https://phab.mercurial-scm.org/D7171
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 13:25:01 -0700] rev 43652
packaging: stop installing Contributors.txt
This file isn't up to date. If we are going to call out
contributors, we should auto generate a file from `hg log`
or something. I don't think we need to include it in the
Windows install.
This change makes Inno more consistent with WiX, which
doesn't ship this file.
Differential Revision: https://phab.mercurial-scm.org/D7170
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 13:21:35 -0700] rev 43651
packaging: remove hg-ssh.8.html from Inno installer
We don't ship hg-ssh because it requires a python.exe to
run, which we don't ship. So it doesn't make sense to ship
the HTML documentation for this tool.
This change makes the Inno install layout more consistent
with WiX, which doesn't ship this file.
Functionality for removing files has been made generic,
in anticipation of future expansion.
Differential Revision: https://phab.mercurial-scm.org/D7169
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 13:00:14 -0700] rev 43650
packaging: install .rc files to hgrc.d
Currently, Inno installs these .rc files to a default.d
directory and WiX to a hgrc.d directory.
Mercurial automatically loads files in an hgrc.d directory
next to the executable and in an "internal" default.d directory.
This "internal" directory is util.datadir, which on Windows
installs made with py2exe is the directory containing hg.exe.
So on Windows both hgrc.d and default.d directories relative
to hg.exe are loaded.
For the install layout, I think it makes sense for hgrc.d to
be used, as that path is documented as non-internal. So this
commit changes the Inno install layout to use hgrc.d instead
of default.d.
.. bc::
Changed default config file location in Windows .exe installers
Mercurial's installer installs some default .rc config
files. Previously, these were installed in a default.d
directory. These are now installed in an hgrc.d directory.
Custom default.d/*.rc files should still be loaded. But it
is recommended to move these to hgrc.d/*.rc.
This change only affects the .exe installers (not the .msi
installers).
Differential Revision: https://phab.mercurial-scm.org/D7168
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Nov 2019 11:13:31 +0100] rev 43649
rust: introduce SIZE_FROM_OTHER_PARENT constant
This will clarify what `-2` meant in the codebase.
This change also merged imports in affected files for cleanup.
Differential Revision: https://phab.mercurial-scm.org/D7301
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Nov 2019 10:32:26 +0100] rev 43648
rust-status: refactor dispatch case for normal files
This should make the code easier to read and more idiomatic.
Differential Revision: https://phab.mercurial-scm.org/D7300
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Nov 2019 10:23:42 +0100] rev 43647
rust-status: return a ParallelIterator instead of a Vec from stat_dmap_entries
This allows the caller function to choose when and how the iteration and/or
collection happens. This change also cleans up the now unused `filter_map`.
Differential Revision: https://phab.mercurial-scm.org/D7299
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Nov 2019 13:43:18 +0100] rev 43646
rust-status: improve status performance
This change does more things in the parallel loop, refactors the file-level
logic into two functions for added clarity.
This bit of Rust code takes 55ms to execute on a repo where the stat'ing part
of Valentin's fast path takes 40ms. While the code differs a bit and it's hard
to get an exact measurement of how much of a performance impact it has, I can
be fairly certain that this implementation is *at worse* twice as slow.
Differential Revision: https://phab.mercurial-scm.org/D7254
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Nov 2019 12:55:56 +0900] rev 43645
bookmarks: accept explicit -r 'wdir()' when adding new bookmarks (issue6218)
Even though the bookmark semantics can't be fully encoded to the virtual
working changeset idea, the active bookmark can be considered a bookmark
of the working revision.
Before, 'tgt' was None, and changes=[(bm, None)] means deleting a bookmark
named 'bm'.
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Nov 2019 12:44:00 +0900] rev 43644
bookmarks: use changectx instead of remembering hex of hidden revision
It should be better to not depend on the ctx variable which was assigned
conditionally.
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Nov 2019 12:32:20 +0900] rev 43643
bookmarks: resolve target revision out of the bookmarks loop
The target revision doesn't depend on the bookmark to be added.
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Nov 2019 12:09:50 +0900] rev 43642
bookmarks: fix handling of multiple bookmarks with one to be deactivated
Before, "hg bookmark --inactive Z Y" would ignore "Y" if "Z" were currently
active. I'm pretty sure it is a bug.
Yuya Nishihara <yuya@tcha.org> [Mon, 11 Nov 2019 22:10:26 +0900] rev 43641
import-checker: allow 'from typing import ...'
Suppresses the following error in test-check-module-imports.t:
mercurial/encoding.py:24: relative import of stdlib module
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Oct 2019 23:33:34 -0700] rev 43640
match: drop support for passing '.' for root dir to visit*() methods
We said we'd drop support for it after 5.1, so it's time to clean it
up now.
Differential Revision: https://phab.mercurial-scm.org/D7249
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 16 Oct 2019 21:31:40 -0700] rev 43639
tests: use time.time() for relative start and stop times
os.times() does not work on Windows. This was resulting in the
test start, stop, and duration times being reported as 0.
This commit swaps in time.time() for wall clock measurements.
This isn't ideal, as time.time() is not monotonic. But Python 2.7
does not have a monotonic timer that works on Windows. So it is
the best we have which is trivially usable. And test times aren't
terribly important, so variances due to clock skew are arguably
acceptable.
Differential Revision: https://phab.mercurial-scm.org/D7126
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 16 Oct 2019 21:25:08 -0700] rev 43638
tests: rename stopped and started variables to reflect times
In preparation for introducing more variables that will have
similar names.
Differential Revision: https://phab.mercurial-scm.org/D7125
Martin von Zweigbergk <martinvonz@google.com> [Wed, 30 Oct 2019 00:00:21 -0700] rev 43637
revset: simplify checkstatus() by using any()
Differential Revision: https://phab.mercurial-scm.org/D7179
Kyle Lippincott <spectral@google.com> [Wed, 06 Nov 2019 18:28:11 -0800] rev 43636
rebase: check for unfinished ops even when inmemory (issue6214)
When using rebase.experimental.inmemory, we should be able to work well with a
dirty working directory, but we can not reliably work if we're in the middle of
another operation (such as another rebase), as we'll potentially stomp on some
state that the other operation needs.
Differential Revision: https://phab.mercurial-scm.org/D7298
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 23:18:47 -0700] rev 43635
status: move initialization closer together
The default initialization happened long before it needed to happen.
Differential Revision: https://phab.mercurial-scm.org/D7145
Martin von Zweigbergk <martinvonz@google.com> [Sat, 19 Oct 2019 00:15:41 -0700] rev 43634
largefiles: avoid dynamically subclassing context instances
E.g. copies.pathcopies() compares context objects for equality and
basectx.__eq__ compares the type. But since largefiles was dynamically
creating classes, they would all be unequal. That led pathcopies(),
after some changes I made, to not short-circuit to get copy info only
from the dirstate. This patch fixes that short-circuiting (and other
places where context are being compared for equality).
Differential Revision: https://phab.mercurial-scm.org/D7143
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 22:08:20 -0700] rev 43633
largefiles: delete unused repo.status_nolfiles()
Differential Revision: https://phab.mercurial-scm.org/D7142
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 21:36:19 -0700] rev 43632
largefiles: use context manager for wlock in repo.status() override
Differential Revision: https://phab.mercurial-scm.org/D7141
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 17:52:19 -0700] rev 43631
largefiles: allow "lfstatus" context manager to set value to False
Differential Revision: https://phab.mercurial-scm.org/D7140
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 17:46:37 -0700] rev 43630
largefiles: move lfstatus context manager to lfutil
Differential Revision: https://phab.mercurial-scm.org/D7139
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Nov 2019 14:35:53 -0800] rev 43629
revlog: delete references to deleted nullid sentinel value
We stopped keeping the nullid in the index in 781b2720d2ac (index:
don't include nullid in len(), 2018-07-20). I forgot to update some
comments about it.
Differential Revision: https://phab.mercurial-scm.org/D7366
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2019 18:15:54 +0100] rev 43628
revlog: remove the, now unused, `revlog._nodepos` attribute
Spotted by Yuya Nishihara.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2019 18:12:50 +0100] rev 43627
nodemap: use bytes for the error message
Spotted by Yuya Nishihara.
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 16:16:31 +0100] rev 43626
py3: use native strings when forming email headers in patchbomb
Per previous changesets, encoded header's values are native str. We
complete the change in patchbomb extension to have literal header values
native str as well. Then we can also change headers' keys to be str. In
_msgid(), we still need to use encoding.strfromlocal() because usage of
os.environ is not allowed by check-code.
This finally removes the "if pycompat.ispy3:" TODO.
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 16:54:33 +0100] rev 43625
mail: convert addr to str early in addrlistencode()
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 15:16:52 +0100] rev 43624
mail: let addressencode() / addrlistencode() return native strings
Avoids conversion to "str" on py3.
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 12:45:14 +0100] rev 43623
mail: let headencode() return a native string
This is to avoid conversion to/from str on py3.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:55 +0100] rev 43622
revlog: deprecate direct `nodemap` access
Now that all in-core user have been updated to the new API, we can deprecated
direct access to nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7362
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:55 +0100] rev 43621
revlog: drop special hack in the `nodemap` property
This code does not seems necessary anymore.
Differential Revision: https://phab.mercurial-scm.org/D7361
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:55 +0100] rev 43620
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 43619
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 43618
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 43617
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 43616
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 43615
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 43614
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 43613
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 43612
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 43611
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 43610
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 43609
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 43608
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 43607
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 43606
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 43605
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 43604
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 43603
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 43602
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 43601
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 43600
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 43599
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 43598
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 43597
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 43596
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 43595
index: use `index.has_node` in `histedit._finishhistedit
Differential Revision: https://phab.mercurial-scm.org/D7351