Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View

Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

Pierre-Yves David
localrepo: also fast past the parents of working copies parents

There are descent odds that they will be needed too. So we also cache and
fastpath them.

Differential Revision: https://phab.mercurial-scm.org/D7498
Pierre-Yves David
localrepo: fastpath access to "."

"." is just an alias for `p1(wdir())`, let us handle it that way.

Differential Revision: https://phab.mercurial-scm.org/D7494
Pierre-Yves David
changectx: mark parent of changesets as non filtered

If a node is not filtered, its parents cannot be filtered.

Differential Revision: https://phab.mercurial-scm.org/D7502
Pierre-Yves David
changectx: use unfiltered changelog to walk ancestors in annotate

Since we are only walking ancestors, it is safe to use an unfiltered repository.
(Because if the original rev is not filtered, none of its ancestors will be).

Differential Revision: https://phab.mercurial-scm.org/D7501
Joerg Sonnenberger
convert: refactor authormap into separate function for outside use

Differential Revision: https://phab.mercurial-scm.org/D7732
Pierre-Yves David
localrepo: also fastpath access to working copy parents when possible

If the filter level guarantee that the working copy parents will be visible, we
allow fast path access to them. With this change multiple commands can now run
without triggering filtering.

After using the quick access mechanism introduced, the whole series results in
pretty good performance gain:

```
All benchmarks:

      before          after        ratio
    [8e095512]      [36b2f659]
-      711±0.8ms      60.7±0.2ms    0.09  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-      712±0.8ms      61.6±0.2ms    0.09  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-        690±1ms      93.5±0.3ms    0.14  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-        688±1ms      93.8±0.3ms    0.14  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-        714±1ms      60.7±0.8ms    0.09  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-        713±1ms      60.9±0.3ms    0.09  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-        689±1ms      93.7±0.2ms    0.14  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-        687±2ms      92.8±0.2ms    0.14  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-        799±2ms      98.1±0.6ms    0.12  simple_command.read.export.bare.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-      800±0.8ms      100.0±0.4ms    0.12  simple_command.read.export.bare.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-      711±0.9ms        111±0.2ms    0.16  simple_command.read.export.bare.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-        711±1ms        112±0.3ms    0.16  simple_command.read.export.bare.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-        760±1ms      59.8±0.1ms    0.08  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-        763±2ms      62.2±0.3ms    0.08  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-        689±1ms      93.1±0.3ms    0.14  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-        688±1ms      94.3±0.3ms    0.14  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-        763±1ms      60.1±0.2ms    0.08  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-        763±1ms      62.1±0.4ms    0.08  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
-      689±0.8ms      93.2±0.2ms    0.14  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
-      687±0.9ms      94.1±0.3ms    0.14  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
```

Differential Revision: https://phab.mercurial-scm.org/D7492
Pierre-Yves David
localrepo: recognize trivial request for '.'

Same logic as for `null`, this is a command request and skipping the revset
logic can avoid triggering the changelog filtering logic.

Differential Revision: https://phab.mercurial-scm.org/D7495
Martin von Zweigbergk
examples: refer to nightly rustfmt in Windows-compatible way

Thanks to Jun Wu for the tip. I found that the new form also gave
better error messages when the nightly rustfmt wasn't installed (it
told me which command to run instead of just saying "error: not a
file: <some path>").

Differential Revision: https://phab.mercurial-scm.org/D7911
Inada Naoki
remotefilelog: fix opening validatecachelog in text mode
Matt Harbison
sha1dc: avoid including the nonexistent stdint.h with Visual Studio 2008

Differential Revision: https://phab.mercurial-scm.org/D7903
Kyle Lippincott
cext: fix compiler warning about sign changing

line.len is a Py_ssize_t, and we're casing to size_t (unsigned). On my compiler,
this causes a warning to be emitted:

```
mercurial/cext/manifest.c: In function 'pathlen':
mercurial/cext/manifest.c:48:44: warning: operand of ?: changes signedness from 'Py_ssize_t' {aka 'long int'} to 'long unsigned int' due to unsignedness of other operand [-Wsign-compare]
  return (end) ? (size_t)(end - l->start) : l->len;
                                            ^~~~~~
```

Differential Revision: https://phab.mercurial-scm.org/D7913
Kyle Lippincott
py3: fix curses chunkselector fallback (when diffs are too large) on py3

Previously we showed the message using Exception.message, which is removed in
py3. Since crecordmod.fallbackerror inherits from error.Abort, we can just use
`b'%s' % exception` to print the message. This does not print the hint, but
that's fine - we don't set one. We inherit from error.Abort so that if a
codepath doesn't handle fallback specially, it exits to the terminal with a sane
message instead of an unknown exception error.

Differential Revision: https://phab.mercurial-scm.org/D7912
Pierre-Yves David
transaction: allow finalizer to add finalizer

It will make some code (persistent nodemap related) simpler to write, because
higher level code can blindly queue finalization without thinking too hard about
the context.

Differential Revision: https://phab.mercurial-scm.org/D7833
Martin von Zweigbergk
rebase: extract a variable for a repeated `repo[p1]`

I'll add another use site in the next patch.

Differential Revision: https://phab.mercurial-scm.org/D7896
Martin von Zweigbergk
copies: replace duplicatecopies() by function that takes contexts

The callers mostly have context objects, so let's avoid looking up the
same context objects inside `duplicatecopies()`.

I also renamed the function to `graftcopies()` since I think that
better matches its purpose. I did it in the same commit so it's easier
for extensions to switch between the functions.

Differential Revision: https://phab.mercurial-scm.org/D7858
Martin von Zweigbergk
graftcopies: use _filter() for filtering out invalid copies

`graftcopies()` (formerly called `duplicatecopies()`) checked that the
copy destination existed in the working copy, but it didn't check that
copy source existed in the parent of the working copy. In
`test-graft.t` we can see that as warnings about not finding ancestors
of the copied files, and also empty commits getting created.

This patch uses the existing `_filter()` function for filtering out
invalid copies. In addition to the aforementioned types, that also
includes copies where source and destination is the same.

Differential Revision: https://phab.mercurial-scm.org/D7859
Martin von Zweigbergk
rebase: fix bug where `--collapse` would apply diff on missing file

Even though the file was missing, the rebase would succeed.

Differential Revision: https://phab.mercurial-scm.org/D7897
Matt Harbison
tests: stabilize test-subrepo-svn.t on Windows

This partially reverts 991e4404e910, because the URL form of `C:\...` gets
escaped to `C%3A/...`, which breaks the substitution of $TESTTMP.

The forget command on 'notafile*' errored out with:

  notafile*: The filename, directory name, or volume label syntax is incorrect

which I think is because '*' isn't a legal character in a file name (though I
can't trigger this directly from MSYS or cmd.exe for some reason).

Differential Revision: https://phab.mercurial-scm.org/D7816
Aay Jay Chan
rust-core: fix typo in comment

Differential Revision: https://phab.mercurial-scm.org/D7895
Martin von Zweigbergk
graft: extract repo[None] to a variable

I plan to allow the caller pass in an overlayworkingctx, so this
prepares for that.

Differential Revision: https://phab.mercurial-scm.org/D7857
Martin von Zweigbergk
graftcopies: document why the function is useful at all

Despite having spent a significant amount on time on the copy-tracing
code, I thought `graftcopies()` (formerly known as
`duplicatecopies()`) was needed to duplicate copies after calling
`merge.update()` to do a merge (as `merge.graft()` does), but it's
actually usually not needed; `merge.update()` takes care of most
copies. This patch documents what the function is for.

Differential Revision: https://phab.mercurial-scm.org/D7861
Martin von Zweigbergk
graftcopies: remove `skip` and `repo` arguments

The `skip` argument was added in 2ba6c9b4e0eb (rebase: fix bug that
caused transitive copy records to disappear (issue4192), 2014-06-07)
in order to fix https://bz.mercurial-scm.org/show_bug.cgi?id=4192. I
ran tests at that commit without the `skiprev` argument and the only
difference I noticed was that `test-rebase-collapse.t` failed
differently, in the call that is now on line 501. Without the
`skiprev` argument, that call would end up creating another commit
because it tried to record an invalid copy. With the previous patch in
this series, such invalid copies are no longer recorded, so it seems
we don't need the `skip` argument anymore.

I also removed the `repo` argument since that also becomes unused with
the removal of the `skip` argument.

Differential Revision: https://phab.mercurial-scm.org/D7860
Gregory Szorc
sha1dc: use buffer protocol when parsing arguments

Without this, functions won't accept bytearray, memoryview,
or other types that can be exposed as bytes to the C API.
The most resilient way to obtain a bytes-like object from
the C API is using the Py_buffer interface.

This commit converts use of s#/y# to s*/y* and uses
Py_buffer for accessing the underlying bytes array.

I checked how hashlib is implemented in CPython and the
the implementation agrees with its use of the Py_buffer
interface as well as using BufferError in cases of bad
buffer types. Sadly, there's no good way to test for
ndim > 1 without writing our own C-backed Python type.

Differential Revision: https://phab.mercurial-scm.org/D7879
Matt Harbison
lfs: rename a variable to clarify its use

This is the response object, not a request.

Differential Revision: https://phab.mercurial-scm.org/D7880
Martin von Zweigbergk
packaging: leverage os.path.relpath() in setup.py

`os.path.relpath()` has existed since Python 2.6, so we can safely use
it. This fixes a bug in the current code when the common prefix is "/"
(in which case `uplevel` would be one less than it should).

Differential Revision: https://phab.mercurial-scm.org/D7875
Gregory Szorc
sha1dc: declare all variables at begininng of block

This is required to appease ancient C language standards, which
msvc 2008 still requires for Python 2.7 on Windows.

Differential Revision: https://phab.mercurial-scm.org/D7877
Matt Harbison
lfs: avoid quadratic performance in processing server responses

This is also adapted from the Facebook repo[1].  Unlike there, we were already
reading the download stream in chunks and immediately writing it to disk, so we
basically avoided the problem on download.  There shouldn't be a lot of data to
read on upload, but it's better to get rid of this pattern.

[1] https://github.com/facebookexperimental/eden/commit/82df66ffe97e21f3ee73dfec093c87500fc1f6a7

Differential Revision: https://phab.mercurial-scm.org/D7882
Raphaël Gomès
rust-utils: add util to find a slice in another slice

Differential Revision: https://phab.mercurial-scm.org/D7863
Raphaël Gomès
dirstate: move rust fast-path calling code to its own method

This logic is about to get bigger, this will make it easier to read and not
pollute the main Python logic.

Differential Revision: https://phab.mercurial-scm.org/D7862
Matt Harbison
lfs: check content length after downloading content

Adapted from the Facebook repo[1].  The intent is to distinguish between the
connection dying and getting served a corrupt blob.

The original message:

HTTP makes no provision to tell your client that you failed halfway through
producing your response and won't have the answer they're looking for. So, if a
LFS server fails while producing a response, then we'll report an OID mismatch.

We can do a little better and disambiguate between "the server sent us the
wrong blob" (very scary) and "the server crashed" (merely annoying) by looking
at the content length of the response we got back. If it's not what was
advertised, we can reasonably safely assume the server crashed.

[1] https://github.com/facebookexperimental/eden/commit/2a4a6fab4e882ed89b948bfc1e7d56d7c3c99dd2

Differential Revision: https://phab.mercurial-scm.org/D7881
Gregory Szorc
sha1dc: manually define integer types on msvc 2008

Python 2.7 on Windows builds with MSVC 2008, which
doesn't include stdint.h. So we need to check for the
compiler version and manually define missing types when it
is ancient.

Differential Revision: https://phab.mercurial-scm.org/D7876
Gregory Szorc
sha1dc: use proper string functions on Python 2/3

PyString_FromStringAndSize doesn't exist on Python 3: we need
to use PyUnicode_FromStringAndSize.

The extension now compiles without warnings on Python 2 and 3.

Differential Revision: https://phab.mercurial-scm.org/D7878
Matt Harbison
doc: fix references to `revset.abstractsmartset`

Differential Revision: https://phab.mercurial-scm.org/D7873
  • hg tests: run-tests.py (python 2.7.10) failed -  stdio
Raphaël Gomès
dirstate: move rust fast-path calling code to its own method

This logic is about to get bigger, this will make it easier to read and not
pollute the main Python logic.

Differential Revision: https://phab.mercurial-scm.org/D7862
  • hg tests: run-tests.py (python 2.7.10) failed -  stdio
Matt Harbison
phabricator: post revisions in ascending topological order (issue6241)

The parent in phabricator ends up being the last revision posted, so sorting the
user input into ascending order should be enough to preserve the proper
relationships.

Differential Revision: https://phab.mercurial-scm.org/D7874
  • hg tests: run-tests.py (python 2.7.10) failed -  stdio
Raphaël Gomès
rust-utils: add util to find a slice in another slice

Differential Revision: https://phab.mercurial-scm.org/D7863
  • hg tests: run-tests.py (python 2.7.10) failed -  stdio
Matt Harbison
lfs: add "bytes" as the unit to the upload/download progress bar

Facebook also passes `util.bytecount()` as a pretty formatter here, but our
progress bar doesn't support that.

Differential Revision: https://phab.mercurial-scm.org/D7872
  • hg tests: run-tests.py (python 2.7.10) failed -  stdio
Rodrigo Damazio Bovendorp
phases: make phasecache._phasesets immutable

Previously, some code paths would mutate the cache itself, which
could give weird results if multiple revsets got evaluated through
that path.

Differential Revision: https://phab.mercurial-scm.org/D7854
Matt Harbison
lfs: add a switch to `hg verify` to ignore the content of blobs

Trying to validate the fulltext of an external revision causes missing blobs to
be downloaded and cached.  Since the downloads aren't batch prefetched[1] and
aren't compressed, this can be expensive both in terms of time and space.

I made this a tri-state instead of a simple bool because there's an existing
(undocumented) config to handle this, and it would be weird if `hg verify` were
to suddenly start ignoring that config but an `hg recover` initiated verify
honors it.  Since this uses the same config setting, it too will skip
rename verification (which requires fulltext, but not for LFS).

[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-April/116118.html

Differential Revision: https://phab.mercurial-scm.org/D7708
Augie Fackler
revlog: run rustfmt nightly

I'm a little nervous about folding this back (might be nightly rustfmt
mismatches?) so I want someone to review this.

Differential Revision: https://phab.mercurial-scm.org/D7813