[PATCH 4 of 4] rust-cpython: mark unsafe functions as such

2019-09-01 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1567328791 -32400 # Sun Sep 01 18:06:31 2019 +0900 # Node ID 7de30788e0ec64cee7bba5b3fd620a188bf81a09 # Parent a69f68569113eaa65e3a0e2773d27e2f2dea00bd rust-cpython: mark unsafe functions as such It wasn't trivial to fix leak_immutable() to

Re: D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths

2019-09-01 Thread Yuya Nishihara
> > @kevincox said "it would be good to [...] add a debug_assert! on > > creation/modification to check that everything is as expected." > > IIUC, his idea is that the `debug_assert!()` condition must always be met, > > which is the guarantee that the HgPath type provides. In order to

[PATCH 3 of 4] rust-cpython: pair leaked reference with its manager object

2019-09-01 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1567327704 -32400 # Sun Sep 01 17:48:24 2019 +0900 # Node ID a69f68569113eaa65e3a0e2773d27e2f2dea00bd # Parent 1da61978931b2f655856fc244613feacbbe2f6f1 rust-cpython: pair leaked reference with its manager object Still leak_immutable() is

D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths

2019-09-01 Thread Raphaël Gomès
Alphare added a comment. > @kevincox said "it would be good to [...] add a debug_assert! on > creation/modification to check that everything is as expected." > IIUC, his idea is that the `debug_assert!()` condition must always be met, > which is the guarantee that the HgPath type

[PATCH 2 of 4] rust-cpython: introduce restricted variant of RefCell

2019-09-01 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1567327050 -32400 # Sun Sep 01 17:37:30 2019 +0900 # Node ID 1da61978931b2f655856fc244613feacbbe2f6f1 # Parent c07848fcfd9c26c2d0f360e0d6356c6a90d1840e rust-cpython: introduce restricted variant of RefCell This should catch invalid

[PATCH 1 of 4] rust-cpython: fix unsafe inner(py).borrow_mut() calls

2019-09-01 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1567326914 -32400 # Sun Sep 01 17:35:14 2019 +0900 # Node ID c07848fcfd9c26c2d0f360e0d6356c6a90d1840e # Parent ce6797ef6eab33f0255b940ff6b628215762a84b rust-cpython: fix unsafe inner(py).borrow_mut() calls Since self.inner is managed by

D6776: bookmarks: validate changes on push

2019-09-01 Thread valentin.gatienbaron (Valentin Gatien-Baron)
valentin.gatienbaron added a comment. (just interested in this change, I don't have any power to actually accept it) Interesting. I've thought of `hg push -B` as forcing the move of the bookmark, and `hg push -r` as not forcing a bookmark move, as that's how they behave (well, mostly).

Re: [PATCH 4 of 4] rust-cpython: mark unsafe functions as such

2019-09-01 Thread Raphaël Gomès
Thanks a lot for this series, it looks very good to me. There was indeed a lot of room for improvement. On 9/1/19 3:40 PM, Yuya Nishihara wrote: # HG changeset patch # User Yuya Nishihara # Date 1567328791 -32400 # Sun Sep 01 18:06:31 2019 +0900 # Node ID

Re: [PATCH 1 of 4] rust-cpython: fix unsafe inner(py).borrow_mut() calls

2019-09-01 Thread Raphaël Gomès
Good catch! That was sloppy of me On 9/1/19 3:40 PM, Yuya Nishihara wrote: # HG changeset patch # User Yuya Nishihara # Date 1567326914 -32400 # Sun Sep 01 17:35:14 2019 +0900 # Node ID c07848fcfd9c26c2d0f360e0d6356c6a90d1840e # Parent ce6797ef6eab33f0255b940ff6b628215762a84b