Gregory Szorc <gregory.szorc@gmail.com> [Fri, 22 Nov 2019 20:12:10 -0800] rev 44229
run-tests: remove --py3-warnings
This Python 2 only mode was to help Python 2 alert when doing
things not supported on Python 3. Now that we have test coverage with
Python 3, I don't think we need it.
Differential Revision: https://phab.mercurial-scm.org/D7978
Georges Racinet <georges.racinet@octobus.net> [Wed, 22 Jan 2020 16:37:05 +0100] rev 44228
rust-node: binary Node ID and conversion utilities
The choice of type makes sure that a `Node` has the exact
wanted size. We'll use a different type for prefixes.
Added dependency: hexadecimal conversion relies on the
`hex` crate.
The fact that sooner or later Mercurial is going to need
to change its hash sizes has been taken strongly in
consideration:
- the hash length is a constant, but that is not directly
exposed to callers. Changing the value of that constant
is the only thing to do to change the hash length (even
in unit tests)
- the code could be adapted to support several sizes of hashes,
if that turned out to be useful. To that effect, only the
size of a given `Node` is exposed in the public API.
- callers not involved in initial computation, I/O and FFI
are able to operate without a priori assumptions on the hash
size. The traits `FromHex` and `ToHex` have not been directly
implemented, so that the doc-comments explaining these
restrictions would stay really visible in `cargo doc`
Differential Revision: https://phab.mercurial-scm.org/D7788
Georges Racinet <georges.racinet@octobus.net> [Wed, 22 Jan 2020 16:23:29 +0100] rev 44227
rust-nodemap: building blocks for nodetree structures
This is similar to `nodetreenode` in `revlog.c`. We give it
a higher level feeling for ease of handling in Rust context
and provide tools for tests and debugging.
The encoding choice is dictated by our ultimate goal in this
series, that is to make an append-only persistent version of
`nodetree`: the 0th Block must be adressed from other Blocks.
Differential Revision: https://phab.mercurial-scm.org/D7787
Matt Harbison <matt_harbison@yahoo.com> [Tue, 21 Jan 2020 10:13:08 -0500] rev 44226
lfs: move the initialization of the upload request into the try block
This (almost) guarantees that the file is closed in the case of an exception.
The one hole is if the `seek(SEEK_END)`/`tell()`/`seek(0)` sequence fails. But
that's going to go away when subclassing `httpconnection.httpsendfile` to fix
the worker problem, so I'm not going to worry too much. (And that class appears
to have the same problem.)
Differential Revision: https://phab.mercurial-scm.org/D7959
Matt Harbison <matt_harbison@yahoo.com> [Tue, 21 Jan 2020 09:55:35 -0500] rev 44225
lfs: drop an unnecessary r'' prefix
No longer necessary since the source transformer was removed.
# skip-blame for changing string prefixes
Differential Revision: https://phab.mercurial-scm.org/D7958
Matt Harbison <matt_harbison@yahoo.com> [Tue, 21 Jan 2020 09:51:39 -0500] rev 44224
lfs: explicitly close the file handle for the blob being uploaded
The previous code relied on reading the blob fully to close it. The obvious
problem is if an error occurs before that point. But there is also a problem
when using workers where the data may need to be re-read, which can't happen
once it is closed. This eliminates the surprising behavior before attempting to
fix the worker problem.
Differential Revision: https://phab.mercurial-scm.org/D7957
Matt Harbison <matt_harbison@yahoo.com> [Tue, 21 Jan 2020 09:40:40 -0500] rev 44223
lfs: drop the unused progressbar code in the `filewithprogress` class
This has been unused since f98fac24b757, which added worker based transfers for
concurrency, shifting the progressbar maintenance to the single thread waiting
on the worker to complete. Since the name no longer fits, rename the class.
Differential Revision: https://phab.mercurial-scm.org/D7956
Raphaël Gomès <rgomes@octobus.net> [Tue, 14 Jan 2020 16:58:07 +0100] rev 44222
rust-filepatterns: remove bridge code for filepatterns-related functions
These functions will be used internally by `hg-core` without needed to be
exposed to Python.
Differential Revision: https://phab.mercurial-scm.org/D7868
Raphaël Gomès <rgomes@octobus.net> [Tue, 14 Jan 2020 18:03:28 +0100] rev 44221
rust-utils: add Rust implementation of Python's "os.path.splitdrive"
I also wrote the NT version although I didn't mean to at first, so I thought
I would keep it, so that any further effort to get the Rust code working on
Windows is a little easier.
Differential Revision: https://phab.mercurial-scm.org/D7864
Alexander Pyhalov <apyhalov@gmail.com> [Mon, 13 Apr 2020 16:30:13 +0300] rev 44220
setup: link osutil.so to libsocket on Solaris/illumos (issue6299)
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Apr 2020 00:24:57 +0200] rev 44219
discovery: avoid wrongly saying there are nothing to pull
We can get in a situation where a revision passed through `hg pull --rev REV`
are available on the server, but not a descendant of the advertised server
heads.
For example the server could lying be during heads advertisement, to hide some
pull request. Or obsolete/hidden content could be explicitly pulled.
So in this case the lookup associated to `REV` returned successfully, but the
normal discovery will find all advertised heads already known locally. This flip
a special boolean `anyinc` that will prevent any fetch attempt, preventing `REV`
to be pulled over.
We add three line of code to detect this case and make sure a pull actually
happens.
My main target is to make some third party extensions happy (I expect the
associated test to move upstream with the extension). However this fix already
make some of the `infinitepush` test happier.
Augie Fackler <raf@durin42.com> [Thu, 02 Apr 2020 12:05:41 -0400] rev 44218
Added signature for changeset 8fca7e8449a8
Augie Fackler <raf@durin42.com> [Thu, 02 Apr 2020 12:05:40 -0400] rev 44217
Added tag 5.3.2 for changeset 8fca7e8449a8
Kyle Lippincott <spectral@google.com> [Wed, 01 Apr 2020 14:14:55 -0700] rev 44216
histedit: add missing b prefix to a string
If i18n is disabled (such as via HGPLAIN=1), `_()` doesn't convert from str to
bytes, so this raises a TypeError on py3.
Differential Revision: https://phab.mercurial-scm.org/D8354
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Mar 2020 18:50:40 -0700] rev 44215
py3: require values in changelog extras to be bytes
I don't know what happened here because b436059c1cca (py3: use
pycompat.bytestr() on extra values because it can be int, 2019-02-05)
came about b44a47214122 (py3: use string for "close" value in commit
extras, 2018-02-11). Whatever happened, we shouldn't need to convert
the values to bytes now. It's better to not convert because that might
cover up bugs where someone sets a unicode value in the extras and
that works until the unicode value happens to contain non-ascii (at
which point it will fail because `bytestr()` expects its argument to
be ascii if it's unicode).
Differential Revision: https://phab.mercurial-scm.org/D8332
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Mar 2020 18:25:58 -0700] rev 44214
py3: make setup.py's hgcommand() consistently return bytes
Before this patch, it returned unicode when the command failed. That
made e.g. `make local PYTHON=python3` fail on an obsolete commit.
Differential Revision: https://phab.mercurial-scm.org/D8331
Kyle Lippincott <spectral@google.com> [Mon, 23 Mar 2020 14:38:00 -0700] rev 44213
darwin: use vim, not vi, to avoid data-loss inducing posix behavior
Apple's version of vim, available at
opensource.apple.com/release/macos-1015.html (for Catalina, but this behavior
has been there for a while) has several tweaks from the version of vim from
vim.org. Most of these tweaks appear to be for "Unix2003" compatibility.
One of the tweaks is that if any ex command raises an error, the entire
process will (when you exit, possibly minutes/hours later) also exit non-zero.
Ex commands are things like `:foo`.
Luckily, they only enabled this if vim was executed (via a symlink or copying
the binary) as `vi` or `ex`. If you start it as `vim`, it doesn't have this
behavior, so let's do that.
To see this in action, run the following two commands on macOS:
```
$ vi -c ':unknown' -c ':qa' ; echo $?
1
$ vim -c ':unknown' -c ':qa' ; echo $?
0
```
We don't want to start ignoring non-zero return types from the editor because
that will mean you can't use `:cquit` to intentionally exit 1 (which,
shows up as 2 if you combine an ex command error and a cquit, but only a 1 if
you just use cquit, so we can't differentiate between the two statuses). Since
we can't differentiate, we have to assume that all non-zero exit codes are
intentional and an indication of the user's desire to not continue with whatever
we're doing. If this was a complicated `hg split` or `hg histedit`, this is
especially disastrous :(
Differential Revision: https://phab.mercurial-scm.org/D8321
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2020 10:04:13 -0400] rev 44212
cext: move variable declaration to the top of the block for C89 support
Not sure if we still care about C89 in general, but MSVC requires this style
too.
Differential Revision: https://phab.mercurial-scm.org/D8304
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 18 Mar 2020 21:27:45 +0100] rev 44211
byteify-string: resolve symlink before byteifying
Otherwise the script turns symlinks into regular files.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Mar 2020 15:23:47 +0100] rev 44210
cext-index: propagate inline_scan error in `index_deref`
Before this change, revlog index corruption could be silently ignored in some
situation.
Differential Revision: https://phab.mercurial-scm.org/D8276
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Mar 2020 18:53:37 +0100] rev 44209
heptapod-ci: fix test paths in the listing file
Now what we run the test from the root, we need to list test name from the root.
Differential Revision: https://phab.mercurial-scm.org/D8275
Raphaël Gomès <rgomes@octobus.net> [Fri, 06 Mar 2020 10:38:37 +0100] rev 44208
hg-core: add a compilation error if trying to compile outside of Linux
For now, we can only provide support for Linux in `hg-core`, so we have to be
explicit about it in case anyone wonders why their Dirstate is suddenly broken,
or why the crate does not compile (on Windows for example).
Differential Revision: https://phab.mercurial-scm.org/D8246
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Mar 2020 18:54:44 +0100] rev 44207
gzip: use the stdlib version with python 3 (issue6284)
It turned out that the stdlib gained the feature we missed in python 3.1. We can
now use it directly.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Mar 2020 18:53:19 +0100] rev 44206
gzip: indent the custom Gzip code
We need a new conditional in the next changesets (Adding 3.8 support). We do the
large code move beforehand for clarity.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Mar 2020 18:57:49 +0100] rev 44205
gzip: rename the argument to `mtime` to match upstream python
Python gained the feature we missed in 3.1. The argument name is `mtime`. We
align our version for consistency.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Mar 2020 16:49:38 +0100] rev 44204
heptapod-ci: run the test from outside the test directory
This will help detecting case where this is broken.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Mar 2020 16:47:02 +0100] rev 44203
run-tests: fix conditional when tests are run outside of `tests`
The logic to find `hghave` was using `__file__` but… non absolute path in
`__file__` gets wrong as soon as we change directory (thanks python… you are
being helpful). The rest of the `run-tests.py` code already deal with this
fine. We simply reuse the `RUNTESTDIR` variable to fix it.
Manuel Jacob <me@manueljacob.de> [Mon, 09 Mar 2020 01:11:59 +0100] rev 44202
tests: fix isinstance test of wrong variable
3086a8627b2970cd7fbf49bc69413c08c68d5514 changed self._case to be a list, but
it was forgotten to adjust this line.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 06 Mar 2020 23:27:28 +0100] rev 44201
discovery: avoid wrong detection of multiple branch heads (issue6256)
This fix the code using obsolescence markers to remove "to be obsoleted" heads
during the detection of new head creation from push. The code turned out to not
use the branch information at all. This lead changeset from different branch to
be detected as new head on unrelated branch.
The code fix is actually quite simple. New tests have been added to covers
these cases.
Differential Revision: https://phab.mercurial-scm.org/D8259
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 06 Mar 2020 00:28:09 +0100] rev 44200
test: cleanly skip test-remotefilelog-datapack.py on policy that breaks it
That tests requires the pure module to be available.
Differential Revision: https://phab.mercurial-scm.org/D8245