[Updated] D9298: copies: introduce the hg-cpython wrapper for `combine_changeset_copies`

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Fri Nov 13 11:21:10 UTC 2020


This revision now requires changes to proceed.
Alphare added inline comments.
Alphare requested changes to this revision.

INLINE COMMENTS

> copy_tracing.rs:44
> +            .cast_into::<PyBool>(py)
> +            .expect("rust-copy-tracing: python call  to `is_ancestor` returned unexpected non-Bool value")
> +            .is_true()

Please use multi-line string literals and/or intermediate variables for long messages.

  let a = "this is \
          "multi-line";

> copy_tracing.rs:61
> +        let p1 = res.get_item(py, 0).extract(py).expect("rust-copy-tracing: rev_info return is invalid, first item is a not a revision");
> +        let p2 = res.get_item(py, 1).extract(py).expect("rust-copy-tracing: rev_info return is invalid, first item is a not a revision");
> +

second item*

> copy_tracing.rs:71
> +            files = ChangedFiles::new_empty();
> +        } else {
> +            let p1_copies: PyDict = changes

I understand that there is usually a lot of boilerplate involved in `hg-cpython`, but this is worth refactoring into two functions: one for getting parent copies and one for getting a set.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D9298/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D9298

To: marmoute, #hg-reviewers, Alphare
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20201113/8d1aed98/attachment-0002.html>


More information about the Mercurial-patches mailing list