D7140: largefiles: allow "lfstatus" context manager to set value to False

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D7140 AFFECTED FILES hgext/largefiles/lfutil.py CHANGE DETAILS diff --git a/hgext/largefiles/lfutil

D7141: largefiles: use context manager for wlock in repo.status() override

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D7141 AFFECTED FILES hgext/largefiles/reposetup.py CHANGE DETAILS diff --git a/hgext/largefiles/rep

D7142: largefiles: delete unused repo.status_nolfiles()

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D7142 AFFECTED FILES hgext/largefiles/reposetup.py CHANGE DETAILS diff --git a/hgext/largefiles/rep

D7143: largefiles: avoid dynamically subclassing context instances

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY E.g. copies.pathcopies() compares context objects for equality and basectx.__eq__ compares the type. But since largefiles was dynamically creating classes, th

D7139: largefiles: move lfstatus context manager to lfutil

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D7139 AFFECTED FILES hgext/largefiles/lfutil.py hgext/largefiles/overrides.py CHANGE DETAILS diff

D7144: status: use unfiltered repo if we're getting status of working copy

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Loading the filtered repo can be slow if there are many obsmarkers and it's not needed in the plain `hg status` case. This saves about 60ms in my hg repo and

D7145: status: move initialization closer together

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The default initialization happened long before it needed to happen. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7145 AFFECTED

D7144: status: use unfiltered repo if we're getting status of working copy

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment. To reviewers: I only care about this patch (and its parent is needed for this to pass tests). Feel free to drop any other patches you don't like. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7144/new/ REVISION DETAIL ht

[PATCH] rust-cpython: run cargo fmt

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1571463019 -32400 # Sat Oct 19 14:30:19 2019 +0900 # Node ID cfe3e9159c6c4eb5b7775a7b813f7f22f55a1f88 # Parent 2cb787b65cf2fbdba09dc03e83a4f1124c0bce8e rust-cpython: run cargo fmt diff --git a/rust/hg-cpython/src/dirstate/status.rs b/rust/h

[PATCH 1 of 9] rust-cpython: rename PyLeakedRef to PyLeaked

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570875051 -32400 # Sat Oct 12 19:10:51 2019 +0900 # Node ID da6ae3bc571609faeb2bd6696efc7869b0420f6a # Parent cfe3e9159c6c4eb5b7775a7b813f7f22f55a1f88 rust-cpython: rename PyLeakedRef to PyLeaked This series will make PyLeaked* behave more

[PATCH 2 of 9] rust-cpython: add stub wrapper that'll prevent leaked data from being mutated

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570875983 -32400 # Sat Oct 12 19:26:23 2019 +0900 # Node ID 3dac380808f19d8c87e03f132e5b39f91cc31953 # Parent da6ae3bc571609faeb2bd6696efc7869b0420f6a rust-cpython: add stub wrapper that'll prevent leaked data from being mutated In order to

[PATCH 3 of 9] rust-cpython: add generation counter to leaked reference

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570278477 14400 # Sat Oct 05 08:27:57 2019 -0400 # Node ID aaf0f677eea8f3b84aff4463c07b20b8b144cbc6 # Parent 3dac380808f19d8c87e03f132e5b39f91cc31953 rust-cpython: add generation counter to leaked reference This counter increments on borrow

[PATCH 4 of 9] rust-cpython: allow mutation unless leaked reference is borrowed

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570879598 -32400 # Sat Oct 12 20:26:38 2019 +0900 # Node ID edff1318e27ba262a44f7f8d7fcf6c44cee43429 # Parent aaf0f677eea8f3b84aff4463c07b20b8b144cbc6 rust-cpython: allow mutation unless leaked reference is borrowed In other words, mutation

[PATCH 5 of 9] rust-cpython: remove useless Option<$leaked> from py_shared_iterator

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570880910 -32400 # Sat Oct 12 20:48:30 2019 +0900 # Node ID 06542ced4e50bd5a5a09ef235fbc33596a47aaac # Parent edff1318e27ba262a44f7f8d7fcf6c44cee43429 rust-cpython: remove useless Option<$leaked> from py_shared_iterator We no longer need to

[PATCH 6 of 9] rust-cpython: leverage RefCell::borrow() to guarantee there's no mutable ref

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570280175 14400 # Sat Oct 05 08:56:15 2019 -0400 # Node ID 6f77f433dd27ae979bcebdd356b611c413c26195 # Parent 06542ced4e50bd5a5a09ef235fbc33596a47aaac rust-cpython: leverage RefCell::borrow() to guarantee there's no mutable ref Since the und

[PATCH 7 of 9] rust-cpython: drop manual management of mutably_borrowed

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570280349 14400 # Sat Oct 05 08:59:09 2019 -0400 # Node ID 80179a0d5152dd7ca90227ba5218c55795f1b647 # Parent 6f77f433dd27ae979bcebdd356b611c413c26195 rust-cpython: drop manual management of mutably_borrowed RefCell::borrow() should guarante

[PATCH 8 of 9] rust-cpython: remove useless PyRefMut wrapper

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570280485 14400 # Sat Oct 05 09:01:25 2019 -0400 # Node ID e325eea5dc005c8032cc577f97fcfc11a8e4b86e # Parent 80179a0d5152dd7ca90227ba5218c55795f1b647 rust-cpython: remove useless PyRefMut wrapper diff --git a/rust/hg-cpython/src/ref_sharing

[PATCH 9 of 9] rust-cpython: remove useless PyResult<> from leak_immutable()

2019-10-19 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570282381 14400 # Sat Oct 05 09:33:01 2019 -0400 # Node ID e0367c78ba38950e0cea945ff0f45916ea92286d # Parent e325eea5dc005c8032cc577f97fcfc11a8e4b86e rust-cpython: remove useless PyResult<> from leak_immutable() The caller should know if th

D7116: rust-performance: introduce FastHashMap type alias for HashMap

2019-10-19 Thread kevincox (Kevin Cox)
kevincox added a comment. In D7116#104769 , @Alphare wrote: > The following comparison shows that for input > 20 bytes, fnv has worse overall performance than xx Sounds good. We can always do benchmarks in the future and swap it. REPOSITO

D7127: sidedatacopies: only fetch information once for merge

2019-10-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment. Nice work on this series. It's all queued now. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7127/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7127 To: marmoute, #hg-reviewers Cc: martinvonz, mercurial-devel

D7074: sidedatacopies: fast path data fetching if revision has no sidedata

2019-10-19 Thread marmoute (Pierre-Yves David)
Closed by commit rHG8a2925265402: sidedatacopies: fast path data fetching if revision has no sidedata (authored by marmoute). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY r

D7075: copies: add an explicit test using multiple roots

2019-10-19 Thread marmoute (Pierre-Yves David)
Closed by commit rHGdda9482f60d2: copies: add an explicit test using multiple roots (authored by marmoute). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHAN

D7076: copies: compute the exact set of revision to walk

2019-10-19 Thread marmoute (Pierre-Yves David)
Closed by commit rHG83bb1e89ab9b: copies: compute the exact set of revision to walk (authored by marmoute). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHAN

D7124: copies: move from a copy on branchpoint to a copy on write approach

2019-10-19 Thread marmoute (Pierre-Yves David)
Closed by commit rHGffd04bc9f57d: copies: move from a copy on branchpoint to a copy on write approach (authored by marmoute). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY r

D7127: sidedatacopies: only fetch information once for merge

2019-10-19 Thread marmoute (Pierre-Yves David)
Closed by commit rHG90213d027154: sidedatacopies: only fetch information once for merge (authored by marmoute). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial

D7131: copies: simplify chain loop

2019-10-19 Thread marmoute (Pierre-Yves David)
Closed by commit rHGf0a2c1972e81: copies: simplify chain loop (authored by marmoute). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

Re: [PATCH 1 of 6 V3] rust-cpython: put leaked reference in PyLeakedRef

2019-10-19 Thread Raphaël Gomès
Great work on this series, thanks. I'll admit it was a little hard to follow all of the intermediary steps needed, but it's better that way for debugging I think. I'll jump on the follow-up. On 10/17/19 3:06 PM, Yuya Nishihara wrote: # HG changeset patch # User Yuya Nishihara # Date 1568552

Re: [PATCH 2 of 9] rust-cpython: add stub wrapper that'll prevent leaked data from being mutated

2019-10-19 Thread Raphaël Gomès
On 10/19/19 12:07 PM, Yuya Nishihara wrote: PyLeakedRef and PyLeakedRefMut could be unified to PyLeakedRef<&T> and PyLeakedRef<&mut T> respectively, but I didn't do that since it seemed a bit weird that deref_mut() would return a mutable reference to an immutable reference. It seems to be the ap

Re: [PATCH 3 of 9] rust-cpython: add generation counter to leaked reference

2019-10-19 Thread Raphaël Gomès
On 10/19/19 12:07 PM, Yuya Nishihara wrote: +#[should_panic(expected = "map() over invalidated leaked reference")] Should we keep a "registry" of those hardcoded errors? To me they feel like magic numbers. I could be nitpicking a little too hard though __

Re: [PATCH 4 of 9] rust-cpython: allow mutation unless leaked reference is borrowed

2019-10-19 Thread Raphaël Gomès
On 10/19/19 12:07 PM, Yuya Nishihara wrote: -# since the iterator is potentially not deleted, -# delete the iterator to release the reference for the Rust -# implementation. -# TODO make the Rust implementation behave like Python -# sinc

Re: [PATCH 1 of 9] rust-cpython: rename PyLeakedRef to PyLeaked

2019-10-19 Thread Raphaël Gomès
Thanks a lot for this series Yuya. This reference-sharing business gets a lot better every time. We should maybe think about bringing Georges and Mark along for the ride for the (near) future upstreaming, don't you think? On 10/19/19 12:07 PM, Yuya Nishihara wrote: # HG changeset patch # Use

Re: [PATCH 3 of 9] rust-cpython: add generation counter to leaked reference

2019-10-19 Thread Yuya Nishihara
On Sat, 19 Oct 2019 22:07:01 +0200, Raphaël Gomès wrote: > On 10/19/19 12:07 PM, Yuya Nishihara wrote: > > +#[should_panic(expected = "map() over invalidated leaked reference")] > Should we keep a "registry" of those hardcoded errors? To me they feel > like magic numbers. I could be nitpicking

Re: [PATCH 1 of 9] rust-cpython: rename PyLeakedRef to PyLeaked

2019-10-19 Thread Yuya Nishihara
On Sat, 19 Oct 2019 22:28:55 +0200, Raphaël Gomès wrote: > We should maybe think about bringing Georges and Mark along for the ride > for the (near) future upstreaming, don't you think? The next batch will fix a couple of nits in our ref_sharing code. And then, I'll probably start upstreaming it.