Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:10:32 +0200] rev 42775
rawdata: update callers in lfs' wrapper
We update callers incrementally because this help bisecting failures. This was
useful during development, so we expect it might be useful again in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:10:24 +0200] rev 42774
rawdata: update caller in wireprotov2server
We update callers incrementally because this help bisecting failures. This was
useful during development, so we expect it might be useful again in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:10:08 +0200] rev 42773
rawdata: update callers in debugcommands
We update callers incrementally because this help bisecting failures. This was
useful during development, so we expect it might be useful again in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:09:53 +0200] rev 42772
rawdata: update callers in sqlitestore
We update callers incrementally because this help bisecting failures. This was
useful during development, so we expect it might be useful again in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 22:35:12 +0200] rev 42771
rawdata: update caller in remotefilelog
We update callers incrementally because this help bisecting failures. This was
useful during development, so we expect it might be useful again in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:09:10 +0200] rev 42770
rawdata: update callers in bundlerepo
We update callers incrementally because this help bisecting failures. This was
useful during development, so we expect it might be useful again in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:08:35 +0200] rev 42769
rawdata: update callers in context
We update callers incrementally because this help bisecting failures. This was
useful during development, so we expect it might be useful again in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:08:26 +0200] rev 42768
rawdata: update caller in revlog
We update callers incrementally because this help bisecting failures. This was
useful during development, so we expect it might be useful again in the future.
Augie Fackler <augie@google.com> [Thu, 15 Aug 2019 14:54:39 -0400] rev 42767
setup: fix a sorting issue I noticed in package names
Differential Revision: https://phab.mercurial-scm.org/D6733
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Aug 2019 10:25:04 +0900] rev 42766
py3: do not convert rust module/attribute names to bytes
policy.import*() functions expect system strings.
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Aug 2019 15:43:41 +0900] rev 42765
transplant: unnest --stop case
It should be aligned with --continue.
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Aug 2019 18:34:05 +0900] rev 42764
rust-discovery: use while loop instead of match + break
This looks slightly nicer.
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Aug 2019 18:31:17 +0900] rev 42763
rust-discovery: remove useless extern crate
Taapas Agrawal <taapas2897@gmail.com> [Fri, 26 Jul 2019 01:19:43 +0530] rev 42762
transplant: added support for --stop flag
This adds fuctionality for `--stop` flag to `transplant`.
A new method `stop` is added to `transplanter` class
containing logic to abort transplant.
Tests are updated as shown.
Differential Revision: https://phab.mercurial-scm.org/D6695
Navaneeth Suresh <navaneeths1998@gmail.com> [Thu, 15 Aug 2019 20:43:25 +0530] rev 42761
unshelve: abort on using --keep and --interactive together
I am working on making interactive mode support `--keep` flag. Until
we support the usage of `--interactive` and `--keep` together, let
us abort on it.
Differential Revision: https://phab.mercurial-scm.org/D6699
Navaneeth Suresh <navaneeths1998@gmail.com> [Tue, 20 Aug 2019 18:35:16 +0300] rev 42760
config: add experimental argument to the config registrar
Until now, there are almost 28 config items which are considered as
`experimental` but, not present in the `experimental` section of
the registrar. This patch adds an `experimental` argument to the
config registrar to mark such config items.
Differential Revision: https://phab.mercurial-scm.org/D6728
Differential Revision: https://phab.mercurial-scm.org/D6746
Augie Fackler <augie@google.com> [Wed, 14 Aug 2019 16:11:45 -0400] rev 42759
tests: split joint repo/changelog fake into one for each type
I'm just not comfortable with fakes that get overloaded for multiple
types: too often it gets out of hand and becomes difficult to trace.
Differential Revision: https://phab.mercurial-scm.org/D6725
Danny Hooper <hooper@google.com> [Tue, 13 Aug 2019 14:28:10 -0700] rev 42758
fix: pass line ranges as value instead of callback
The callback no longer takes any arguments from the inner function, so we might
as well call it sooner and pass the value instead. Note the value still needs
to be recomputed every iteration to account for the previous iteration's
changes to the file content.
Differential Revision: https://phab.mercurial-scm.org/D6727
Danny Hooper <hooper@google.com> [Tue, 13 Aug 2019 14:20:48 -0700] rev 42757
fix: correctly parse the :metadata subconfig
It's being handled as a string instead of a bool, though the thruthiness of the
string makes the feature still essentially work. Added a regression test.
Differential Revision: https://phab.mercurial-scm.org/D6726
Danny Hooper <hooper@google.com> [Mon, 12 Aug 2019 16:39:39 -0700] rev 42756
fix: allow tools to use :linerange, but also run if a file is unchanged
The definition of "unchanged" here is subtle, because pure deletion diff hunks
are ignored. That means this is different from using the --whole flag. This
change allows you to configure, for example, a code formatter that:
1. Formats specific line ranges if specified via flags
2. Does not format the entire file when there are no line ranges provided
3. Performs some other kind of formatting regardless of provided line ranges
This sounds a little far fetched, but it is meant to address a specific corner
case encountered in Google's use of the fix extension. The default behavior is
kept because it exists to prevent mistakes that could erase uncommitted
changes.
Differential Revision: https://phab.mercurial-scm.org/D6723
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Jul 2019 09:57:28 +0200] rev 42755
rust-dirstate: call rust dirstatemap from Python
Since Rust-backed Python classes cannot be used as baseclasses (for
rust-cpython anyway), we use composition rather than inheritance.
This also allows us to keep the IO operations in the Python side, removing
(for now) the need to rewrite VFS in Rust, which would be a heavy undertaking.
Differential Revision: https://phab.mercurial-scm.org/D6634
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Jul 2019 09:56:53 +0200] rev 42754
rust-dirstate: rust-cpython bridge for dirstatemap
This change also showcases the limitations of the `py_shared_ref!` macro.
See the previous commit 'rust-dirstate: rust implementation of dirstatemap`
for an explanation for the TODOs in the code.
Differential Revision: https://phab.mercurial-scm.org/D6633
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Jul 2019 09:56:23 +0200] rev 42753
rust-dirstate: rust implementation of dirstatemap
The `dirstatemap` is one of the last building blocks needed to get to a
`dirstate.walk` Rust implementation.
Disclaimer: This change is part of a big (10) series of patches, all of which
started as one big changeset that took a long time to write.
This `dirstatemap` implementation is a compromise in terms of complexity both
for me and for the reviewers. I chose to submit this patch right now because
while it is not perfect, it works and is simple enough (IMHO) to be reviewed.
The Python implementation uses a lot of lazy propertycaches, breaks
encapsulation and is used as an iterator in a lot of places, all of which
dictated the somewhat unidiomatic patterns in this change.
Like written in the comments, rewriting this struct to use the typestate
pattern might be a good idea, but this is a good first step.
Differential Revision: https://phab.mercurial-scm.org/D6632
Raphaël Gomès <rgomes@octobus.net> [Tue, 09 Jul 2019 15:15:54 +0200] rev 42752
rust-cpython: add macro for sharing references
Following an experiment done by Georges Racinet, we now have a working way of
sharing references between Python and Rust. This is needed in many points of
the codebase, for example every time we need to expose an iterator to a
Rust-backed Python class.
In a few words, references are (unsafely) marked as `'static` and coupled
with manual reference counting; we are doing manual borrow-checking.
This changes introduces two declarative macro to help reduce boilerplate.
While it is better than not using macros, they are not perfect. They need to:
- Integrate with the garbage collector for container types (not needed
as of yet), as stated in the docstring
- Allow for leaking multiple attributes at the same time
- Inject the `py_shared_state` data attribute in `py_class`-generated
structs
- Automatically namespace the functions and attributes they generate
For at least the last two points, we will need to write a procedural macro
instead of a declarative one.
While this reference-sharing mechanism is being ironed out I thought it best
not to implement it yet.
Lastly, and implementation detail renders our Rust-backed Python iterators too
strict to be proper drop-in replacements, as will be illustrated in a future
patch: if the data structure referenced by a non-depleted iterator is mutated,
an `AlreadyBorrowed` exception is raised, whereas Python would allow it, only
to raise a `RuntimeError` if `next` is called on said iterator. This will have
to be addressed at some point.
Differential Revision: https://phab.mercurial-scm.org/D6631
Raphaël Gomès <rgomes@octobus.net> [Tue, 09 Jul 2019 14:53:34 +0200] rev 42751
rust-docstrings: add missing module docstrings
Differential Revision: https://phab.mercurial-scm.org/D6630
Raphaël Gomès <rgomes@octobus.net> [Wed, 17 Jul 2019 11:37:43 +0200] rev 42750
rust-dirstate: improve API of `DirsMultiset`
- Use opaque `Iterator` type instead of implementation-specific one from
`HashMap`
- Make `DirsMultiset` behave like a set both in Rust and from Python
Differential Revision: https://phab.mercurial-scm.org/D6690
Raphaël Gomès <rgomes@octobus.net> [Tue, 09 Jul 2019 12:15:09 +0200] rev 42749
rust-dirstate: use EntryState enum instead of literals
This improves code readability quite a bit, while also adding a layer of
safety because we're checking the state byte against the enum.
Differential Revision: https://phab.mercurial-scm.org/D6629
Raphaël Gomès <rgomes@octobus.net> [Tue, 09 Jul 2019 11:49:49 +0200] rev 42748
rust-parsers: switch to parse/pack_dirstate to mutate-on-loop
Both `parse_dirstate` and `pack_dirstate` can operate directly on the data
they're passed, which prevents the creation of intermediate data structures,
simplifies the function signatures and reduces boilerplate. They are exposed
directly to the Python for now, but a later patch will make use of them inside
`hg-core`.
Differential Revision: https://phab.mercurial-scm.org/D6628
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Jul 2019 10:16:28 +0200] rev 42747
rust-parsers: move parser bindings to their own file and Python module
This tidies up the Rust side while simplifying the Python side.
Differential Revision: https://phab.mercurial-scm.org/D6627
Raphaël Gomès <rgomes@octobus.net> [Mon, 08 Jul 2019 18:01:39 +0200] rev 42746
rust-dirstate: create dirstate submodule in hg-cpython
This module will soon hold multiple files, this change is to make the
review process easier.
Differential Revision: https://phab.mercurial-scm.org/D6626