Sat, 19 Oct 2019 14:30:19 +0900 rust-cpython: run cargo fmt
Yuya Nishihara <yuya@tcha.org> [Sat, 19 Oct 2019 14:30:19 +0900] rev 43483
rust-cpython: run cargo fmt
Sat, 05 Oct 2019 09:33:01 -0400 rust-cpython: remove useless PyResult<> from leak_immutable()
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 09:33:01 -0400] rev 43482
rust-cpython: remove useless PyResult<> from leak_immutable() The caller should know if the shared data is mutably borrowed or not.
Sat, 05 Oct 2019 09:01:25 -0400 rust-cpython: remove useless PyRefMut wrapper
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 09:01:25 -0400] rev 43481
rust-cpython: remove useless PyRefMut wrapper
Sat, 05 Oct 2019 08:59:09 -0400 rust-cpython: drop manual management of mutably_borrowed
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 08:59:09 -0400] rev 43480
rust-cpython: drop manual management of mutably_borrowed RefCell::borrow() should guarantee there's no mutable borrow. As a follow up, maybe PySharedState can be a pure data structure + function. Most ref-sharing business has already been moved to PySharedRef* and PyLeaked*.
Sat, 05 Oct 2019 08:56:15 -0400 rust-cpython: leverage RefCell::borrow() to guarantee there's no mutable ref
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 08:56:15 -0400] rev 43479
rust-cpython: leverage RefCell::borrow() to guarantee there's no mutable ref Since the underlying value can't be mutably borrowed by PyLeaked, we don't have to manage yet another mutably-borrowed state. We can just rely on the RefCell implementation. Maybe we can add try_leak_immutable(), but this patch doesn't in order to keep the patch series not too long.
Sat, 12 Oct 2019 20:48:30 +0900 rust-cpython: remove useless Option<$leaked> from py_shared_iterator
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Oct 2019 20:48:30 +0900] rev 43478
rust-cpython: remove useless Option<$leaked> from py_shared_iterator We no longer need to carefully drop the iterator when it's consumed. Mutation is allowed even if the iterator exists. There's a minor behavior change: next(iter) may return/raise something other than StopIteration if it's called after the iterator has been fully consumed, and if the Rust object isn't a FusedIterator.
Sat, 12 Oct 2019 20:26:38 +0900 rust-cpython: allow mutation unless leaked reference is borrowed
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Oct 2019 20:26:38 +0900] rev 43477
rust-cpython: allow mutation unless leaked reference is borrowed In other words, mutation is allowed while a Python iterator holding PyLeaked exists. The iterator will be invalidated instead. We still need a borrow_count to prevent mutation while leaked data is dereferenced in Rust world, but most leak_count business is superseded by the generation counter. decrease_leak_count(py, true) will be removed soon.
Sat, 05 Oct 2019 08:27:57 -0400 rust-cpython: add generation counter to leaked reference
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 08:27:57 -0400] rev 43476
rust-cpython: add generation counter to leaked reference This counter increments on borrow_mut() to invalidate existing leaked references. This is modeled after the iterator invalidation in Python. The other checks will be adjusted by the subsequent patches.
Sat, 12 Oct 2019 19:26:23 +0900 rust-cpython: add stub wrapper that'll prevent leaked data from being mutated
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Oct 2019 19:26:23 +0900] rev 43475
rust-cpython: add stub wrapper that'll prevent leaked data from being mutated In order to allow mutation of PySharedRefCell value while PyLeaked reference exists, we need yet another "borrow" scope where mutation is prohibited. try_borrow<'a> and try_borrow_mut<'a> defines the "borrow" scope <'a>. The subsequent patches will implement leak counter based on this scope. PyLeakedRef<T> and PyLeakedRefMut<T> 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.
Sat, 12 Oct 2019 19:10:51 +0900 rust-cpython: rename PyLeakedRef to PyLeaked
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Oct 2019 19:10:51 +0900] rev 43474
rust-cpython: rename PyLeakedRef to PyLeaked This series will make PyLeaked* behave more like a Python iterator, which means mutation of the owner object will be allowed and the leaked reference (i.e. the iterator) will be invalidated instead. I'll add PyLeakedRef/PyLeakedRefMut structs which will represent a "borrowed" state, and prevent the underlying value from being mutably borrowed while the leaked reference is in use: let shared = self.inner_shared(py); let leaked = shared.leak_immutable(); { let leaked_ref: PyLeakedRef<_> = leaked.borrow(py); shared.borrow_mut(); // panics since the underlying value is borrowed } shared.borrow_mut(); // allowed The relation between PyLeaked* structs is quite similar to RefCell/Ref/RefMut, but the implementation can't be reused because the borrowing state will have to be shared across objects having no lifetime relation. PyLeaked isn't named as PyLeakedCell since it isn't actually a cell in that leaked.borrow_mut() will require &mut self.
Thu, 09 Jan 2020 14:19:20 -0500 fix: fix grammar/typos in hg help -e fix stable
timeless <timeless@mozdev.org> [Thu, 09 Jan 2020 14:19:20 -0500] rev 43473
fix: fix grammar/typos in hg help -e fix
Thu, 02 Jan 2020 17:27:37 -0800 progress: flush stderr after clearing stable
Kyle Lippincott <spectral@google.com> [Thu, 02 Jan 2020 17:27:37 -0800] rev 43472
progress: flush stderr after clearing On python3, ui.stderr is buffered, it seems, so we need to flush it to actually get the progress bar off the screen. This is important since ui.write() will call into progbar.clear() if it thinks there's a progress bar on the screen, with the intent that the next thing it outputs is at the beginning of the line (instead of at the end of the progress bar line). Without the flush, we buffer up the clearing of the screen, and we get some really weird/corrupt output. Differential Revision: https://phab.mercurial-scm.org/D7784
Tue, 24 Dec 2019 01:38:02 -0500 subrepo: fix a crash when archiving an svn or git subrepo stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 24 Dec 2019 01:38:02 -0500] rev 43471
subrepo: fix a crash when archiving an svn or git subrepo Only hgsubrepos have a repository attribute. This is pretty hacky, but probably the best we can do on stable. Pushing the lfstatus check down into the wrapper for hgsubrepo (and dropping the check for lfstatus at the top of `hgsubrepoarchive()`) resulted in various test failures because: 1) hgsubrepoarchive isn't returning the number of files archived at the bottom, resulting in an error about += NoneType 2) These copypasta archive wrappers don't use progress bars 3) Largefiles are *not* currently archived when using extdiff (68822b7cdd01), but pushing this context manager down into the subrepo resulted in it apparently doing so (as evidenced by progress bars being dropped) The other uses of `lfstatus()` are not in the substate processing loop, so they shouldn't be an issue. I initially put testcases in this test for largefiles-{on,off}, and it flagged a bunch of exit code differences for `cat` and `diff`, so I backed that off. Differential Revision: https://phab.mercurial-scm.org/D7714
Mon, 06 Jan 2020 14:58:32 -0500 Added signature for changeset b4c82b704180 stable
Augie Fackler <raf@durin42.com> [Mon, 06 Jan 2020 14:58:32 -0500] rev 43470
Added signature for changeset b4c82b704180
(0) -30000 -10000 -3000 -1000 -300 -100 -14 +14 +100 +300 +1000 +3000 tip