mercurial@40940: 4 new changesets (4 on stable)

2018-12-15 Thread Mercurial Commits
4 new changesets (4 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/e11e03f72baf changeset: 40937:e11e03f72baf branch: stable parent: 40926:21f5810df848 user:Matt Harbison date:Sat Dec 15 01:26:18 2018 -0500 summary: py3: ensure the proxied

Re: [PATCH 4 of 5] py3: stop subscripting socket.error

2018-12-15 Thread Yuya Nishihara
On Sun, 16 Dec 2018 01:19:47 -0500, Matt Harbison wrote: > On Sun, 16 Dec 2018 00:55:20 -0500, Yuya Nishihara wrote: > > > On Sun, 16 Dec 2018 00:36:45 -0500, Matt Harbison wrote: > >> > I'm not sure what to do with this info yet, but I just noticed that > >> > pager is also messed up on py3-

Re: [PATCH 4 of 5] py3: stop subscripting socket.error

2018-12-15 Thread Matt Harbison
On Sun, 16 Dec 2018 00:55:20 -0500, Yuya Nishihara wrote: On Sun, 16 Dec 2018 00:36:45 -0500, Matt Harbison wrote: > I'm not sure what to do with this info yet, but I just noticed that > pager is also messed up on py3- the debug message about spawning the > pager prints, but no output for the

Re: [PATCH 4 of 5] py3: stop subscripting socket.error

2018-12-15 Thread Yuya Nishihara
On Sun, 16 Dec 2018 00:36:45 -0500, Matt Harbison wrote: > > I'm not sure what to do with this info yet, but I just noticed that > > pager is also messed up on py3- the debug message about spawning the > > pager prints, but no output for the diff. Use --pager=no, and it shows > > up. So

Re: [PATCH 1 of 4] py3: ensure the proxied Windows fd doesn't escape by entering context manager

2018-12-15 Thread Yuya Nishihara
On Sat, 15 Dec 2018 21:06:37 -0500, Matt Harbison wrote: > On Sat, 15 Dec 2018 20:02:08 -0500, Yuya Nishihara wrote: > > > On Sat, 15 Dec 2018 15:04:24 -0500, Matt Harbison wrote: > >> # HG changeset patch > >> # User Matt Harbison > >> # Date 1544855178 18000 > >> # Sat Dec 15 01:26:18

Re: [PATCH 1 of 2] py3: quote $PYTHON in test-patchbomb.t for Windows

2018-12-15 Thread Yuya Nishihara
On Sat, 15 Dec 2018 23:29:44 -0500, Matt Harbison wrote: > # HG changeset patch > # User Matt Harbison > # Date 1544931114 18000 > # Sat Dec 15 22:31:54 2018 -0500 > # Node ID 0c1bac5efa4fe85778e5e6aa23380d9a7d73f57a > # Parent f8dc10fa7ca7415ee95bfe6ba50d728b2f58eab1 > py3: quote $PYTHON

Re: [PATCH 4 of 5] py3: stop subscripting socket.error

2018-12-15 Thread Matt Harbison
On Sat, 15 Dec 2018 23:58:13 -0500, Matt Harbison wrote: On Mon, 10 Dec 2018 07:12:41 -0500, Yuya Nishihara wrote: On Sun, 09 Dec 2018 23:39:33 -0500, Matt Harbison wrote: I ended up with similar stdio errors trying to track down the bad http status failures: Traceback (most recent call

Re: [PATCH 4 of 5] py3: stop subscripting socket.error

2018-12-15 Thread Matt Harbison
On Mon, 10 Dec 2018 07:12:41 -0500, Yuya Nishihara wrote: On Sun, 09 Dec 2018 23:39:33 -0500, Matt Harbison wrote: I ended up with similar stdio errors trying to track down the bad http status failures: Traceback (most recent call last): File "c:\Users\Matt\hg\mercurial\ui.py", line 1033,

D5442: rust-cpython: using the new bindings from Python

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > +try: > +from . import rustext > +except ImportError: > +rustext = None Need to access to e.g. rustext.__doc__ to trigger ImportError here. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5442 To: gracinet, indygreg,

D5443: ancestor: uniformity of calling lazyancestors classes

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > +def parentsfunc(index): > +def parentrevs(rev): > +try: > +entry = index[rev] > +except IndexError: > +if rev == wdirrev: > +raise error.WdirUnsupported > +raise > + > +

Re: D5442: rust-cpython: using the new bindings from Python

2018-12-15 Thread Yuya Nishihara
> +try: > +from . import rustext > +except ImportError: > +rustext = None Need to access to e.g. rustext.__doc__ to trigger ImportError here. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org

Re: D5443: ancestor: uniformity of calling lazyancestors classes

2018-12-15 Thread Yuya Nishihara
> +def parentsfunc(index): > +def parentrevs(rev): > +try: > +entry = index[rev] > +except IndexError: > +if rev == wdirrev: > +raise error.WdirUnsupported > +raise > + > +return entry[5], entry[6] > +return

D5441: rust-cpython: binding for LazyAncestors

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > m.add_class::(py)?; > > +m.add_class::(py)?; Nit: While it's correct per our naming convention, I prefer calling it as `LazyAncestors` in Rust, and export as `lazyancestors`. REPOSITORY rHG Mercurial REVISION DETAIL

D5440: rust: core implementation for lazyancestors

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > - a/rust/hg-core/src/lib.rs +++ b/rust/hg-core/src/lib.rs @@ -2,8 +2,10 @@ // // This software may be used and distributed according to the terms of the // GNU General Public License version 2 or any later version. +use std::clone::Clone; Nit: it's in prelude.

Re: D5441: rust-cpython: binding for LazyAncestors

2018-12-15 Thread Yuya Nishihara
> m.add_class::(py)?; > +m.add_class::(py)?; Nit: While it's correct per our naming convention, I prefer calling it as `LazyAncestors` in Rust, and export as `lazyancestors`. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org

Re: D5440: rust: core implementation for lazyancestors

2018-12-15 Thread Yuya Nishihara
> --- a/rust/hg-core/src/lib.rs > +++ b/rust/hg-core/src/lib.rs > @@ -2,8 +2,10 @@ > // > // This software may be used and distributed according to the terms of the > // GNU General Public License version 2 or any later version. > +use std::clone::Clone; Nit: it's in prelude. > /// The

[PATCH 2 of 2] color: fix a documentation typo

2018-12-15 Thread Matt Harbison
# HG changeset patch # User Matt Harbison # Date 1544933643 18000 # Sat Dec 15 23:14:03 2018 -0500 # Node ID 4e1802a4834c9bf0a04eac3a981e503491016c3e # Parent 0c1bac5efa4fe85778e5e6aa23380d9a7d73f57a color: fix a documentation typo diff --git a/mercurial/color.py b/mercurial/color.py ---

[PATCH 1 of 2] py3: quote $PYTHON in test-patchbomb.t for Windows

2018-12-15 Thread Matt Harbison
# HG changeset patch # User Matt Harbison # Date 1544931114 18000 # Sat Dec 15 22:31:54 2018 -0500 # Node ID 0c1bac5efa4fe85778e5e6aa23380d9a7d73f57a # Parent f8dc10fa7ca7415ee95bfe6ba50d728b2f58eab1 py3: quote $PYTHON in test-patchbomb.t for Windows I couldn't get the quoting right in the

D5439: rust-cpython: binding for AncestorsIterator

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > // GNU General Public License version 2 or any later version. > > - //! Bindings for the hg::ancestors module provided by the Nit: perhaps the empty line was removed by mistake. > +fn reviter_to_revvec(py: Python, revs: PyObject) -> PyResult> { > +

Re: D5439: rust-cpython: binding for AncestorsIterator

2018-12-15 Thread Yuya Nishihara
> // GNU General Public License version 2 or any later version. > - > //! Bindings for the hg::ancestors module provided by the Nit: perhaps the empty line was removed by mistake. > +fn reviter_to_revvec(py: Python, revs: PyObject) -> PyResult> { > +let revs_iter = revs.iter(py)?; > +

D5438: rust-cpython: implementing Graph using C parents function

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > +type IndexParentsFn = unsafe extern "C" fn( > +index: *mut python_sys::PyObject, > +rev: ssize_t, > +ps: *mut [c_int; 2], > +max_rev: c_int, > +) -> c_int; The type differs from the private function. It's `int

Re: D5438: rust-cpython: implementing Graph using C parents function

2018-12-15 Thread Yuya Nishihara
> +type IndexParentsFn = unsafe extern "C" fn( > +index: *mut python_sys::PyObject, > +rev: ssize_t, > +ps: *mut [c_int; 2], > +max_rev: c_int, > +) -> c_int; The type differs from the private function. It's `int HgRevlogIndex_GetParents(PyObject *op, int rev, int *ps)`. > +impl

D5434: rust-cpython: started cpython crate bindings

2018-12-15 Thread gracinet (Georges Racinet)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa3ba080b3118: rust-cpython: start cpython crate bindings (authored by gracinet, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D5434?vs=12871=12883#toc REPOSITORY rHG

D5433: rust-cpython: excluded hgcli from workspace

2018-12-15 Thread gracinet (Georges Racinet)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG6e815adf91de: rust-cpython: exclude hgcli from workspace (authored by gracinet, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D5433?vs=12870=12882#toc REPOSITORY rHG

D5436: rust-cpython: build via HGWITHRUSTEXT=cpython

2018-12-15 Thread gracinet (Georges Racinet)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9e755c16f05d: rust-cpython: build via HGWITHRUSTEXT=cpython (authored by gracinet, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D5436?vs=12873=12885#toc REPOSITORY rHG

D5437: rust-cpython: testing the bindings from Python

2018-12-15 Thread gracinet (Georges Racinet)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG57e3dfeb3a5d: rust-cpython: testing the bindings from Python (authored by gracinet, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D5435: rust: better treatment of cargo/rustc errors

2018-12-15 Thread gracinet (Georges Racinet)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG5955cf85ed74: rust: better treatment of cargo/rustc errors (authored by gracinet, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D5435?vs=12872=12884#toc REPOSITORY rHG

D5434: rust-cpython: started cpython crate bindings

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. I've queued the first 5 patches, thanks. Please send a follow up to fix nits and minor issues. > +py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| { > +m.add( > +py, > +"__doc__", > +"Mercurial core

Re: D5434: rust-cpython: started cpython crate bindings

2018-12-15 Thread Yuya Nishihara
I've queued the first 5 patches, thanks. Please send a follow up to fix nits and minor issues. > +py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| { > +m.add( > +py, > +"__doc__", > +"Mercurial core concepts - Rust implementation", > +)?; > + >

D5436: rust-cpython: build via HGWITHRUSTEXT=cpython

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. I expect we'll soon drop the support for the old ffi binding. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5436 To: gracinet, #hg-reviewers Cc: yuja, mercurial-devel ___ Mercurial-devel mailing

Re: D5436: rust-cpython: build via HGWITHRUSTEXT=cpython

2018-12-15 Thread Yuya Nishihara
I expect we'll soon drop the support for the old ffi binding. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

D5435: rust: better treatment of cargo/rustc errors

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > +cargocmd = ['cargo', 'build', '-vv', '--release'] > +try: > +subprocess.check_call(cargocmd, env=env, cwd=self.rustsrcdir) > +except OSError as exc: > +if exc.errno == os.errno.ENOENT: Added `import

Re: D5435: rust: better treatment of cargo/rustc errors

2018-12-15 Thread Yuya Nishihara
> +cargocmd = ['cargo', 'build', '-vv', '--release'] > +try: > +subprocess.check_call(cargocmd, env=env, cwd=self.rustsrcdir) > +except OSError as exc: > +if exc.errno == os.errno.ENOENT: Added `import errno` to not abuse `os.errno`. I don't think

Re: [PATCH 1 of 4] py3: ensure the proxied Windows fd doesn't escape by entering context manager

2018-12-15 Thread Matt Harbison
On Sat, 15 Dec 2018 20:02:08 -0500, Yuya Nishihara wrote: On Sat, 15 Dec 2018 15:04:24 -0500, Matt Harbison wrote: # HG changeset patch # User Matt Harbison # Date 1544855178 18000 # Sat Dec 15 01:26:18 2018 -0500 # Node ID 068910232e124a50a13fd7444844d9151db48d6b # Parent

D5444: help: use "yes" and "no" for boolean defaults instead of "on" and "off"

2018-12-15 Thread yuja (Yuya Nishihara)
yuja added a comment. I feel `--no-` and `--=off|false` are more natural, and `(default: %s)` is the latter form. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5444 To: av6, durin42, #hg-reviewers Cc: yuja, martinvonz, pulkit, mercurial-devel

Re: D5444: help: use "yes" and "no" for boolean defaults instead of "on" and "off"

2018-12-15 Thread Yuya Nishihara
I feel `--no-` and `--=off|false` are more natural, and `(default: %s)` is the latter form. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Re: [PATCH 4 of 4 V2] sparse-revlog: protect C code against delta chain including nullrev

2018-12-15 Thread Yuya Nishihara
On Sat, 15 Dec 2018 15:10:56 +, Boris Feld wrote: > # HG changeset patch > # User Boris Feld > # Date 1544804741 -3600 > # Fri Dec 14 17:25:41 2018 +0100 > # Node ID e7d33dc28696a1b2ee951cb82fe2cd611037afc8 > # Parent 36c68746763d6b93b00c19387e79bd9cb623da72 > # EXP-Topic

Re: [PATCH 2 of 4 V2] sparse-revlog: handle nullrev in index_get_start

2018-12-15 Thread Yuya Nishihara
On Sat, 15 Dec 2018 15:10:54 +, Boris Feld wrote: > # HG changeset patch > # User Boris Feld > # Date 1544804621 -3600 > # Fri Dec 14 17:23:41 2018 +0100 > # Node ID 216e6d5c773cd51c18e351b11a8105165d2ad2d7 > # Parent c1e47daaab82e7d9340b0bd179d022fdd21062fc > # EXP-Topic

Re: [PATCH 1 of 4] py3: ensure the proxied Windows fd doesn't escape by entering context manager

2018-12-15 Thread Yuya Nishihara
On Sat, 15 Dec 2018 15:04:24 -0500, Matt Harbison wrote: > # HG changeset patch > # User Matt Harbison > # Date 1544855178 18000 > # Sat Dec 15 01:26:18 2018 -0500 > # Node ID 068910232e124a50a13fd7444844d9151db48d6b > # Parent 5817c3b186a7799ecc3130493ba134b55cd4ba07 > py3: ensure the

[PATCH 4 of 4] windows: ensure pure posixfile fd doesn't escape by entering context manager

2018-12-15 Thread Matt Harbison
# HG changeset patch # User Matt Harbison # Date 1544903706 18000 # Sat Dec 15 14:55:06 2018 -0500 # Node ID 46761e235265dc2cfb4e8f54c5f7c6f5b7d58906 # Parent 847613113d3ac24106fcd3ca727428b6e02022ae windows: ensure pure posixfile fd doesn't escape by entering context manager There are

[PATCH 3 of 4] vfs: ensure closewrapbase fh doesn't escape by entering context manager

2018-12-15 Thread Matt Harbison
# HG changeset patch # User Matt Harbison # Date 1544900077 18000 # Sat Dec 15 13:54:37 2018 -0500 # Node ID 847613113d3ac24106fcd3ca727428b6e02022ae # Parent d40ef8f0cd2cce5b41e48924fc2a3d486b4c534d vfs: ensure closewrapbase fh doesn't escape by entering context manager I'm not sure if

[PATCH 2 of 4] windows: ensure mixedfilemodewrapper fd doesn't escape by entering context mgr

2018-12-15 Thread Matt Harbison
# HG changeset patch # User Matt Harbison # Date 1544899294 18000 # Sat Dec 15 13:41:34 2018 -0500 # Node ID d40ef8f0cd2cce5b41e48924fc2a3d486b4c534d # Parent 068910232e124a50a13fd7444844d9151db48d6b windows: ensure mixedfilemodewrapper fd doesn't escape by entering context mgr Otherwise

[PATCH 1 of 4] py3: ensure the proxied Windows fd doesn't escape by entering context manager

2018-12-15 Thread Matt Harbison
# HG changeset patch # User Matt Harbison # Date 1544855178 18000 # Sat Dec 15 01:26:18 2018 -0500 # Node ID 068910232e124a50a13fd7444844d9151db48d6b # Parent 5817c3b186a7799ecc3130493ba134b55cd4ba07 py3: ensure the proxied Windows fd doesn't escape by entering context manager The purpose

D5444: help: use "yes" and "no" for boolean defaults instead of "on" and "off"

2018-12-15 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment. Arguments against yes/no: 1. "default: yes/no" can easily be read as "is this a default", which is not quite the same, although it would have the same effect. 2. On/off fits well in sentences like "is --hidden on by default". I see your arguments too

D5444: help: use "yes" and "no" for boolean defaults instead of "on" and "off"

2018-12-15 Thread av6 (Anton Shestakov)
av6 added a comment. The point of https://phab.mercurial-scm.org/D5430 was to make hg help output more human friendly by replacing `True` and `False` with something less Python-related. In other words, more human-friendly. "Yes" and "no" are way more human-friendly: - they are one of

D5444: help: use "yes" and "no" for boolean defaults instead of "on" and "off"

2018-12-15 Thread pulkit (Pulkit Goyal)
pulkit added a comment. TBH, I think 'on' and 'off' are more appropriate than 'yes' and 'no'. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5444 To: av6, durin42, #hg-reviewers Cc: pulkit, mercurial-devel ___

[PATCH 3 of 4 V2] sparse-revlog: handle nullrev in index_get_length

2018-12-15 Thread Boris Feld
# HG changeset patch # User Boris Feld # Date 1544804684 -3600 # Fri Dec 14 17:24:44 2018 +0100 # Node ID 36c68746763d6b93b00c19387e79bd9cb623da72 # Parent 216e6d5c773cd51c18e351b11a8105165d2ad2d7 # EXP-Topic sparse-followup # Available At https://bitbucket.org/octobus/mercurial-devel/ #

[PATCH 4 of 4 V2] sparse-revlog: protect C code against delta chain including nullrev

2018-12-15 Thread Boris Feld
# HG changeset patch # User Boris Feld # Date 1544804741 -3600 # Fri Dec 14 17:25:41 2018 +0100 # Node ID e7d33dc28696a1b2ee951cb82fe2cd611037afc8 # Parent 36c68746763d6b93b00c19387e79bd9cb623da72 # EXP-Topic sparse-followup # Available At https://bitbucket.org/octobus/mercurial-devel/ #

[PATCH 1 of 4 V2] revlog: introduce a constant for nullrev in `revlog.c`

2018-12-15 Thread Boris Feld
# HG changeset patch # User Boris Feld # Date 1544804562 -3600 # Fri Dec 14 17:22:42 2018 +0100 # Node ID c1e47daaab82e7d9340b0bd179d022fdd21062fc # Parent 2f14d1bbc9a7a142b421285c0708320b46be7a56 # EXP-Topic sparse-followup # Available At https://bitbucket.org/octobus/mercurial-devel/ #

[PATCH 2 of 4 V2] sparse-revlog: handle nullrev in index_get_start

2018-12-15 Thread Boris Feld
# HG changeset patch # User Boris Feld # Date 1544804621 -3600 # Fri Dec 14 17:23:41 2018 +0100 # Node ID 216e6d5c773cd51c18e351b11a8105165d2ad2d7 # Parent c1e47daaab82e7d9340b0bd179d022fdd21062fc # EXP-Topic sparse-followup # Available At https://bitbucket.org/octobus/mercurial-devel/ #

D5441: rust-cpython: binding for LazyAncestors

2018-12-15 Thread kevincox (Kevin Cox)
kevincox accepted this revision. kevincox added inline comments. INLINE COMMENTS > ancestors.rs:98 > +// TODO borrow() can panic, replace with try_borrow() > +// or consider it's ok thanks to the GIL > +AncestorsIterator::from_inner(py, It should be fine with tbe GIL.

D5440: rust: core implementation for lazyancestors

2018-12-15 Thread kevincox (Kevin Cox)
kevincox accepted this revision. kevincox added inline comments. INLINE COMMENTS > ancestors.rs:120 > +/// This is mostly meant for iterators backing a lazy ancestors set > +pub fn empty() -> bool { > +if self.visit.len() > 0 { Can you clarify this `is_empty` to match rust

D5439: rust-cpython: binding for AncestorsIterator

2018-12-15 Thread kevincox (Kevin Cox)
kevincox accepted this revision. kevincox added inline comments. INLINE COMMENTS > ancestors.rs:32 > +Err(_) => 0, // unknown > +}; > +let mut initvec: Vec = Vec::with_capacity(cap); revs.len(py).unwrap_or(0) > ancestors.rs:40 > +Ok(revpy) => revpy.extract(py)?, > +

D5443: ancestor: uniformity of calling lazyancestors classes

2018-12-15 Thread gracinet (Georges Racinet)
gracinet added a comment. obviously, this one could be adapted for application before the rust-cpython bindings, and extended for the `incrementalmissingancestors` as well REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5443 To: gracinet, indygreg,

D5438: rust-cpython: implementing Graph using C parents function

2018-12-15 Thread gracinet (Georges Racinet)
gracinet added a comment. Here, I'd be tempted to submit a `py_capsule_fn` macro to rust-cpython, but I guess it can wait. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5438 To: gracinet, #hg-reviewers Cc: durin42, kevincox, mercurial-devel

D5370: rust: core implementation of missingancestors (no bindings)

2018-12-15 Thread gracinet (Georges Racinet)
gracinet abandoned this revision. gracinet marked an inline comment as done. gracinet added a comment. This Differential has been superseded by https://phab.mercurial-scm.org/D5414 through https://phab.mercurial-scm.org/D5417 REPOSITORY rHG Mercurial REVISION DETAIL

D5444: help: use "yes" and "no" for boolean defaults instead of "on" and "off"

2018-12-15 Thread av6 (Anton Shestakov)
av6 created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5444 AFFECTED FILES mercurial/help.py tests/test-extension.t

D5443: ancestor: uniformity of calling lazyancestors classes

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added a reviewer: indygreg. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Up to now, the pure Python lazyancestors had been taking the parents function in its constructor, whereas Rust-backed variants

D5442: rust-cpython: using the new bindings from Python

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added a reviewer: indygreg. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The Python callers detect if we have cpython or direct-ffi bindings and fallback to the Python implementation if none is

D5440: rust: core implementation for lazyancestors

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Once exposed through appropriate bindings, this should be able to replace ancestor.lazyancestors entirely. REPOSITORY rHG Mercurial

D5441: rust-cpython: binding for LazyAncestors

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY For consistency with Python implementation, we're exposing it with the lower case spelling, so that if one day the whole ancestor module has a

D5438: rust-cpython: implementing Graph using C parents function

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY A pointer to the parents function is stored on the parsers C extension module as a capsule object. This is the recommended way to export a

D5434: rust-cpython: started cpython crate bindings

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This changeset introduces the hg-cpython crate, that compiles as a shared library holding a whole Python package (mercurial.rustext), with

D5437: rust-cpython: testing the bindings from Python

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is easier and more convincing than doing the same tests from a Rust tests module. REPOSITORY rHG Mercurial REVISION DETAIL

D5439: rust-cpython: binding for AncestorsIterator

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It's now reachable from Python as rustext.ancestor.AncestorsIterator Tests are provided in the previously introduced Python testcase:

D5436: rust-cpython: build via HGWITHRUSTEXT=cpython

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The existing behaviour, building the direct ffi bindings if HGIWTHRUSTEXT is just set is unchanged, but if HGWITHRUSTEXT is cpython, then the cpython bindings

D5435: rust: better treatment of cargo/rustc errors

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5435 AFFECTED FILES setup.py CHANGE DETAILS diff --git a/setup.py b/setup.py --- a/setup.py +++

D5433: rust-cpython: excluded hgcli from workspace

2018-12-15 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY hgcli uses a specific rust-cpython commit by indygreg, of which a PR has been derived which is not merged nor released yet. But we can't use several

D5417: rust: translated random test of missingancestors

2018-12-15 Thread gracinet (Georges Racinet)
gracinet added a comment. @yuja: I'll look into it, maybe that's a case for benches (I've not played with them yet). REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5417 To: gracinet, #hg-reviewers Cc: yuja, durin42, kevincox, mercurial-devel