D10344: sidedata: enable sidedata computers to optionally rewrite flags

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Sidedata computers may want to influence the flags of the revision they touch. For example, the computer for changelog-based

D10350: test-copies: test that copies' sidedata can get computed during push

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If the source of the push does not have the necessary sidedata but the server needs them, the client should compute them on the fly while pushing. REPOSITORY

D10349: test-copies: test that copies' sidedata can get computed during pull

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If the source does not have the data, the pulling client should compute the necessary side-data while pulling. REPOSITORY rHG Mercurial BRANCH default

D10348: test-copies: test that copies' sidedata does not get corrupted during push

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is an important usecase. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10348 AFFECTED FILES

D10347: test-copies: test that copies' sidedata does not get corrupted during pull

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is an important usecase. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10347 AFFECTED FILES

D10346: test-copies: simplify some conditional output

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that all computation using sidedata give the same result, we can simplify conditional REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10341: sidedata: gate sidedata functionality to revlogv2 in more places

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10341 AFFECTED FILES mercurial/changegroup.py

D10343: cg4: use revision flag to signify the presence of sidedata

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY When generating deltas, apply the flag if there is sidedata. When applying the deltas, if the flag is present, the next chunk contains the sidedata.

D10345: bundle2: remove restriction around sidedata

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We are now capable of generating the missing sidedata on-the-fly. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10342: changegroup: don't limit cgv4 to revlogv2 repos

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY To help the transition from revlogv1 to revlogv2, we need to be able to enable cgv4 for revlogv1 repos, so that revlogv2 clients can handle adding/removing

D10340: sidedata: register copies sidedata computer regardless of the revlog version

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Repositories should not gate their sidedata computers based on any requirement, only their wanted sidedata. REPOSITORY rHG Mercurial BRANCH default

D10339: changegroup: update comment

2021-04-09 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Gratuitous fix, I stumbled upon this comment while reading code. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

Re: Python 2 removal and thg packaging status

2021-04-03 Thread Raphaël Gomès
+ CC actually Greg, oops On 4/3/21 6:18 PM, Raphaël Gomès wrote: Hello all, As you all know, Mercurial's codebase is still burdened by Python 2 support. Patches still need to be adapted for backwards compat, some Python niceties still cannot be used, and the Heptapod CI which is used

Python 2 removal and thg packaging status

2021-04-03 Thread Raphaël Gomès
Hello all, As you all know, Mercurial's codebase is still burdened by Python 2 support. Patches still need to be adapted for backwards compat, some Python niceties still cannot be used, and the Heptapod CI which is used on a near majority of the patches we collectively land is still putting

D10229: formatting: fix redundant parentheses

2021-03-17 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These were introduced by 0d055849d5f9d682ef931d2566b760d5c6bf7e52 . REPOSITORY rHG

D10217: rust-status: fix issue6456 for the Rust implementation also

2021-03-15 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This implementation is being used by a few people now, so we need it fixed, even though a big rewrite will be coming quite soon. REPOSITORY rHG Mercurial

D10216: configitems: add TODOs blocking the move out of experimental for revlogv2

2021-03-15 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These are the todos so far, we probably will have more, but we might as well list them while they're fresh in our minds. REPOSITORY rHG Mercurial BRANCH

D10151: revlog: add attribute on revlogs that specifies its kind

2021-03-10 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The sidedata logic needs to check whether the revlog it's working on is a changelog, a manifest or a filelog. Furthermore, future versions of the revlog

D10113: format: remove sidedata format variant

2021-03-04 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This format variant can only exist when also using revlog v2, so it's useless now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10109: requirements: also add a fncache constant

2021-03-04 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Continue the cleanup to the remaining requirements REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10109

D10106: requirements: also add a generaldelta constant

2021-03-04 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Continue the cleanup to the remaining requirements REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10106

D10108: requirements: also add a store constant

2021-03-04 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Continue the cleanup to the remaining requirements REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10108

D10105: requirements: add constant for revlog v1 requirement

2021-03-04 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since this series is adding a new requirement, we might as well clean up while we're here. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10107: requirements: also add a dotencode constant

2021-03-04 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Continue the cleanup to the remaining requirements REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10107

D10104: pure-parsers: document index class constants

2021-03-04 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10104 AFFECTED FILES mercurial/pure/parsers.py CHANGE DETAILS diff --git

D10034: narrow: fix flaky behavior described in issue6150

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This has been plaguing the CI for a good while, and it doesn't appear to have an easy fix proposed yet. The solution in this

D10026: changegroup: add v4 changegroup for revlog v2 exchange

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10026 AFFECTED FILES

D10032: sidedata-exchange: rewrite sidedata on-the-fly whenever possible

2021-02-19 Thread Raphaël Gomès
Simulates a server for a simple sidedata exchange. +# +# Copyright 2021 Raphaël Gomès +# +# This software may be used and distributed according to the terms of the +# GNU General Public License version 2 or any later version. + +from __future__ import absolute_import + +import hashlib +import stru

D10031: revlog-index: add `replace` method

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY During a `pull` operation where the server does not provide sidedata, the client that requires it should generate them on-the-fly. In the generic case, we need

D10028: sidedata-exchange: add `wanted_sidedata` and `sidedata_computers` to repos

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Each repo will advertise the sidedata categories it requires (categories being unique and canonical), and have a set of "computers", functions to generate

D10029: changegroupv4: add sidedata helpers

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These helpers carry the information and computers needed to rewrite sidedata when generating/applying patches. We will be

D10030: revlogv2: temporarily forbid inline revlogs

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY See inline comments. I plan to fix the underlying issue before revlogv2 is stabilized. REPOSITORY rHG Mercurial BRANCH

D10027: delta: add sidedata field to revision delta

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10027 AFFECTED FILES hgext/sqlitestore.py

D10025: revlogv2: don't assume that the sidedata of the last rev is right after data

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We are going to be rewriting sidedata soon, it's going to be appended to the revlog data file, meaning that the data and the

D10024: error: add `hint` attribute to `SidedataHashError`

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This prevents an exception within an exception because `hint` does not exist. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10023: changegroup: use the local variable instead of reaching through self

2021-02-19 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Gratuitous cleanup while I was here. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10023 AFFECTED FILES

D9993: sidedata: move to new sidedata storage in revlogv2

2021-02-15 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The current (experimental) sidedata system uses flagprocessors to signify the presence and store/retrieve sidedata from the

D9987: tests: fix differing output between py2 and py3

2021-02-12 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY db9e33beb0fb broke the tests because of the

D9986: bundle2: pass the operation source down to the changegroup

2021-02-12 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9986 AFFECTED FILES mercurial/bundle2.py CHANGE DETAILS diff --git

D9977: rust-status: honor matcher when using the dirstate-only fast-path (issue6483)

2021-02-10 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9977 AFFECTED FILES rust/hg-core/src/dirstate/status.rs tests/test-status.t

D9976: status: add test that shows that the Rust implementation has a bug

2021-02-10 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9976 AFFECTED FILES tests/test-status.t CHANGE DETAILS diff --git

Re: [PATCH STABLE] procutil: extend gui test to detect wayland session (issue6479)

2021-02-04 Thread Raphaël Gomès
Thanks for doing this patch so quickly Yuja. LGTM On 2/4/21 12:21 PM, Yuya Nishihara wrote: # HG changeset patch # User Yuya Nishihara # Date 1612436205 -32400 # Thu Feb 04 19:56:45 2021 +0900 # Branch stable # Node ID 6cc6b8610cec85dc624f4bb6568c2fd16ac018d1 # Parent

D9902: revlog: use a less probable revlog version for backwards compatibility

2021-01-28 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This allows us to define a usable v2. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9902 AFFECTED FILES

D9903: revlog: prepare pure parser for being overloaded

2021-01-28 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The current class uses module-level variables which don't allow for reusing the current logic for a slightly different revlog version. REPOSITORY rHG

D9844: revlogv2: allow upgrading to v2

2021-01-20 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Revlogv2 implies sidedata. Right now sidedata is not really used in production, and Revlogv2 will be used for the first production-ready version of sidedata

D9843: revlog: introduce v2 format

2021-01-20 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY As documented in [1], this is still tentative and could be subject to change, but we need to lay down the foundations in

D9846: cext: add support for revlogv2

2021-01-20 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9846 AFFECTED FILES mercurial/cext/parsers.c

D9845: bitmanipulation: add utils to read/write bigendian 64bit integers

2021-01-20 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9845 AFFECTED FILES mercurial/bitmanipulation.h CHANGE DETAILS diff --git

D9717: contrib: stop building rust for every job

2021-01-11 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is just wasteful for all steps that do not use Rust. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9717

D9716: contrib: remove testing for `dirstate-tree` Rust feature

2021-01-11 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This feature will be replaced in a few months, and served more as a proof-of-concept. Keeping it in CI when no one is using it anymore is just wasteful.

New revlog format, plan page

2021-01-05 Thread Raphaël Gomès
Hi all, During the last (virtual) sprint, a lot of us spoke about the need for a format change of the revlog to overcome some of its limitations. I've opened a very much draft plan page [1] to try to list all the things we want to do in that version and try to figure out an efficient new

D9518: wireprotov2: re-add tuple around `bundle2` check

2020-12-04 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I stumbled upon this while looking for the current (v1) `capable` method. It looks like 9c2c77c73f23

D9426: copies-rust: hide most of the comparison details inside a closure

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The function that compares values needs various supporting elements that are the same for each call. We are about to both make change to these element and

D9425: copies-rust: move the mapping merging into a else clause

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We are going to add more cases, to it is time to stop using early returns and to move everything in a single if/elif/else block for clarity. REPOSITORY rHG

D9422: copies: iterate over children directly (instead of parents)

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Before this change we would gather all parent → child edges and iterate on all parent, gathering copy information for children and aggregating them from

D9424: copies-rust: extract conflicting value comparison in its own function

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY First, that logic is complicated enough to be in it own function. Second, we want to start adding alternative path within the merge code so we need this logic

D9423: copies: no longer cache the ChangedFiles during copy tracing

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that the copies information for both parents are processed all at once, we no longer needs to cache this information, so we simplify the code. The

D9421: copies-rust: extract the processing of a ChangedFiles in its own function

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a reasonably independent piece of code that we can extract in its own function. This extraction will be very useful for the next changeset, where we

D9420: copies-rust: move the parent token to an enum

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We carry around information about which parent of a revision is been dealt with. So far this was a `usize` but as we are about to pass it around to more

D9419: copies: properly copies parent dictionary before updating it

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This enforces the copy on write logic. Otherwise independant unrelated branches could affected each other. More testing of these case are coming, but I

D9418: copies: clarify the return of _merge_copies_dict

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I misused that function twice in the past few days, so lets clarify the API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D9417: copies: simplify the call to _merge_copies_dict

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Let's get the argument into the right order, then call the function once. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D9416: copies: avoid unwanted side effect from one branch to another

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Without this copy, change in a one descendant branch (With "remove" change only) could affect computation on another descendant branches. This was not

D9415: copies: fast path no-op merge

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If the two sides of the merge are the same (they come an unaltered common ancestors) we don't need any merging. REPOSITORY rHG Mercurial BRANCH default

D9409: hg-core: add format-bytes dependency

2020-11-26 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This will be used in the next patch to make error messages that require bytestring concatenation clearer. REPOSITORY rHG Mercurial BRANCH default

D9408: hg-core: add basic config module

2020-11-26 Thread Raphaël Gomès
config/layer.rs @@ -0,0 +1,267 @@ +// layer.rs +// +// Copyright 2020 +// Valentin Gatien-Baron, +// Raphaël Gomès +// +// This software may be used and distributed according to the terms of the +// GNU General Public License version 2 or any later version. + +//! Layering system for Mercurial

D9407: rhg: use `format_bytes!` for error messages

2020-11-26 Thread Raphaël Gomès
"].concat())?; +ui.write_stdout(_bytes!(b"{}\n", bytes.as_slice()))?; Ok(()) } diff --git a/rust/rhg/Cargo.toml b/rust/rhg/Cargo.toml --- a/rust/rhg/Cargo.toml +++ b/rust/rhg/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "rhg" version = "0.1

D9320: rust-status: don't bubble up os errors, translate them to bad matches

2020-11-16 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY In the rare cases when either the OS/filesystem throws an error on an otherwise valid action, or because a path is not representable on the filesystem, or

D9319: rust-status: properly translate OSError to Python

2020-11-16 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is probably never going to be called after the next few patches, but we might as well make sure this is done correctly for the future rewrite. REPOSITORY

D9170: tests: only diff the `Cargo.lock` in `test-check-cargo-lock.t`

2020-10-08 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY While not perfect (you could be running tests while developing with a justified modification to `Cargo.lock`), that use-case is small enough that I don't

D9149: py3: use native string when comparing with a function's argspec

2020-10-05 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I only found two such bugs in `contrib/perf.py` REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9149 AFFECTED

D9138: rust: update minimum supported Rust compiler version

2020-10-01 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Debian stable backported `rustc 1.41.1` for a Firefox release that needed it, so we can finally update the compiler version to something that isn't more than

D9137: rust: leverage improved match ergonomics

2020-10-01 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9137 AFFECTED FILES rust/hg-core/src/dirstate/status.rs CHANGE DETAILS diff

D9136: rust-parsers: use in-place mutation instead of allocating a new `Vec`

2020-10-01 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is not done for the `dirstate-tree` feature, since it lacks `iter_mut`. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D9133: rust: start plugging the dirstate tree behind a feature gate

2020-09-30 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The previous patch added the `dirstate-tree` feature gate to enable the two dirstate implementations to co-habit while the tree-based one gets better. This

D9132: rust: introduce `dirstate-tree` cargo feature

2020-09-30 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This feature gates (at compile-time) the use of the newly-added dirstate tree. The motivation for this is that the dirstate tree is currently *very* slow;

Re: Improving the CI experience

2020-09-29 Thread Raphaël Gomès
On 9/28/20 8:12 PM, Augie Fackler wrote: On Sep 28, 2020, at 10:43, Raphaël Gomès <mailto:raphael.go...@octobus.net>> wrote: Hi all, As you may know, we (Octobus) and other Mercurial contributors have been using the Heptapod [1] CI to vet our patches pre-submission against 7

Improving the CI experience

2020-09-28 Thread Raphaël Gomès
Hi all, As you may know, we (Octobus) and other Mercurial contributors have been using the Heptapod [1] CI to vet our patches pre-submission against 7 variants of Mercurial: - Python 2 pure - Python 3 pure - Python 2 python+c - Python 3 python+c - Python 2 rust+c - Python 3 rust+c - Python 2

D9094: rust: clippy pass

2020-09-28 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This removes some justified warnings and one hard error that, while technically not a bug, was an ugly oversight on my part. REPOSITORY rHG Mercurial

D9093: rust: format with rustfmt

2020-09-28 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I suppose I ran the formatter on the tip but not on every patch. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D9085: rust: add `dirstate_tree` module

2020-09-25 Thread Raphaël Gomès
+1,682 @@ +// tree.rs +// +// Copyright 2020, Raphaël Gomès +// +// This software may be used and distributed according to the terms of the +// GNU General Public License version 2 or any later version. + +use super::iter::Iter; +use super::node::{Directory, Node, NodeKind}; +use crate::dirstate

D9084: rust-dirstatemap: add #[timed] to dirstatemap read for comparison

2020-09-25 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9084 AFFECTED FILES rust/hg-core/src/dirstate/dirstate_map.rs CHANGE DETAILS

D9079: rust-tests: add test to check if `Cargo.lock` is up-to-date

2020-09-24 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY An out-of-date `Cargo.lock` is the source of rebase conflicts, prevents a reproductible build, introduces desync between the series that introduces a change

D9080: rust: update Cargo.lock

2020-09-24 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9080 AFFECTED FILES rust/Cargo.lock CHANGE DETAILS diff --git a/rust/Cargo.lock

D9071: rust-matchers: make `Matcher` trait object-safe

2020-09-23 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Before this patch, it is not possible to create a `Matcher` trait-object (like `Box`), because of the use of a generic parameters in some methods, namely

Re: Failing To Find Directory

2020-09-14 Thread Raphaël Gomès
What does your config path for phabricator look like? On 9/11/20 5:39 PM, Jake Mulhern wrote: Hello, I used Mercurial to make and submit a patch to Phabricator for Mozilla last week for the first time.  I began to make a patch this week for Mozilla again and continue to get this message

D8990: rust-cpython: switch logging facade from `simple_logger` to `env_logger`

2020-09-06 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY `simple_logger` is just too simple. `env_logger` supports logging to `stderr`, and logging filtering, for example, which are becoming necessary now. The

Re: Website: add a blog?

2020-08-03 Thread Raphaël Gomès
On 03/08/2020 17:39, Augie Fackler wrote: Oh, and if we wanted to take this as an opportunity to try and move to a more common static-site-generator rather than a custom flask app, I'd be in favor of that too... ;) + 1 On Aug 3, 2020, at 11:37, Augie Fackler wrote: Howdy folks, I've been

D8663: hg-core: define a `dirstate_status` `Operation`

2020-06-25 Thread Raphaël Gomès
ations/dirstate_status.rs new file mode 100644 --- /dev/null +++ b/rust/hg-core/src/operations/dirstate_status.rs @@ -0,0 +1,76 @@ +// dirstate_status.rs +// +// Copyright 2019, Raphaël Gomès +// +// This software may be used and distributed according to the terms of the +// GNU General Public L

D8661: rust-status: refactor status into a struct

2020-06-25 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The code for `dirstate/status` has grown too large for comfort, this is the first of three patches that try to improve maintainability. In this patch,

D8662: rust-status: improve documentation and readability

2020-06-25 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This patch is 2/3 in the series to improve the dirstate status code. It adds a number of common type aliases to add more obvious semantics to function

Re: Virtual sprint? Ideas?

2020-06-22 Thread Raphaël Gomès
Hi there, I think keeping the global sprint going even if in a new format is a good idea, but considering the obvious timezone issues we need to be quite organized if we want to do anything real-time. Here's an idea: let's build up a list of all the main topics we want to discuss, estimate

D8635: rust: do a clippy pass

2020-06-15 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is the result of running `cargo clippy` on hg-core/hg-cpython and fixing the lints that do not require too much code churn (and would warrant a separate

D8634: hg-core: commit forgotten Cargo.lock

2020-06-15 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This should have been in 2093b2fc70d4 , but I apparently forgot. REPOSITORY rHG

D8605: rust-dependencies: upgrade `micro-timer` dependency

2020-06-02 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I wanted to to a tour of dependencies to upgrade, but only `micro-timer` has a new release which does not print when the function panics, which should be less

D8456: rust: remove duplicate import

2020-05-30 Thread Raphaël Gomès
Closed by commit rHGbe3e85cf8f4d: rust: remove duplicate import (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Revision". CHANGED PRIOR TO COMMIT

D8594: rust: remove support for `re2`

2020-05-29 Thread Raphaël Gomès
at /// can't. This should only happen through programmer error. NonRegexPattern(IgnorePattern), -/// This is temporary, see `re2/mod.rs`. -/// This will cause a fallback to Python. -Re2NotInstalled, } impl ToString for PatternError { @@ -166,10 +161,6 @@ Patter

D8593: rust-dependencies: update `regex` to 1.3.9

2020-05-29 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Version `1.3.8` introduces support for empty alternations, which makes previously disallowed patterns usable in `regex`. From a user's perspective, this

Re: [PATCH 1 of 2] rust: fix false comment about mpsc::Sender

2020-05-25 Thread Raphaël Gomès
Good catch, patch 2 also looks good, thanks. On 5/25/20 4:27 PM, Yuya Nishihara wrote: # HG changeset patch # User Yuya Nishihara # Date 1590415327 -32400 # Mon May 25 23:02:07 2020 +0900 # Node ID 261fbbdabb261a44c0f82537f10abbcc0d85ace1 # Parent f3b69aecfdc3f6149a30f87bba43396890c2bee7

Re: Adding a cache for dirstate

2020-05-20 Thread Raphaël Gomès
Bikeshedding update: How about naming it "DirsTraversalCache" instead? "DirsCache" was a bit of a placeholder and not clear enough for my taste (and others as well I've been told). It would go in `.hg/wcache/dirs_traversal_cache`. On 5/14/20 7:47 PM, Raphaël Gomès wro

<    1   2   3   4   5   6   7   8   9   10   >