[PATCH 1 of 5] rust-cpython: put leaked reference in PyLeakedRef

2019-10-12 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1568552779 -32400 # Sun Sep 15 22:06:19 2019 +0900 # Node ID 458c6598a13caee640294d88af4e93783fc36476 # Parent ce20b870041fc4d6ba6989acbb9373797ce9b3d6 rust-cpython: put leaked reference in PyLeakedRef The next patch will make PyLeakedRef ma

[PATCH 2 of 5] rust-cpython: make PyLeakedRef operations relatively safe

2019-10-12 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1568553550 -32400 # Sun Sep 15 22:19:10 2019 +0900 # Node ID cc5c8c53a19d3965eef6a38bcfd88216cfa31d42 # Parent 458c6598a13caee640294d88af4e93783fc36476 rust-cpython: make PyLeakedRef operations relatively safe This patch encapsulates the acc

[PATCH 3 of 5] rust-cpython: require GIL to borrow immutable reference from PySharedRefCell

2019-10-12 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1569053750 -32400 # Sat Sep 21 17:15:50 2019 +0900 # Node ID c1cfc2cf51ecd02e523325bd5d49c09004591e7d # Parent cc5c8c53a19d3965eef6a38bcfd88216cfa31d42 rust-cpython: require GIL to borrow immutable reference from PySharedRefCell Since the in

[PATCH 4 of 5] rust-cpython: keep Python<'a> token in PyRefMut

2019-10-12 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1569053101 -32400 # Sat Sep 21 17:05:01 2019 +0900 # Node ID f95a0332aec4dace1579c44bbd73feca9f228fda # Parent c1cfc2cf51ecd02e523325bd5d49c09004591e7d rust-cpython: keep Python<'a> token in PyRefMut This just clarifies that the GIL is obtai

[PATCH 5 of 5] rust-cpython: make inner functions and structs of ref_sharing private

2019-10-12 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1570285294 14400 # Sat Oct 05 10:21:34 2019 -0400 # Node ID dbe969ca04b9711aa3b244b2dcea9b9925bab960 # Parent f95a0332aec4dace1579c44bbd73feca9f228fda rust-cpython: make inner functions and structs of ref_sharing private Most of these method

D7066: phabricator: convert phabhunk and phabchange keys to bytes when finalising

2019-10-12 Thread Kwan (Ian Moody)
Kwan created this revision. Kwan added a comment. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. I'd missed out the attrs key conversion needed on py3. REVISION SUMMARY I thought I had included this code already but I'd missed it out. One of the disadva

D7052: phabricator: change conduit data format to match arcanist

2019-10-12 Thread Kwan (Ian Moody)
Kwan added a comment. Kwan updated this revision to Diff 17102. I'd missed out the attrs key conversion needed on py3. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7052?vs=17082&id=17102 BRANCH default CHANGES SINCE LAST ACTION https://phab.merc

D7053: phabricator: switch to the creatediff endpoint

2019-10-12 Thread Kwan (Ian Moody)
Kwan added a comment. Kwan updated this revision to Diff 17103. I'd missed out the attrs key conversion needed on py3. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7053?vs=17083&id=17103 BRANCH default CHANGES SINCE LAST ACTION https://phab.merc

D7054: phabricator: treat non-utf-8 text files as binary as phabricator requires

2019-10-12 Thread Kwan (Ian Moody)
Kwan added a comment. Kwan updated this revision to Diff 17104. I'd missed out the attrs key conversion needed on py3. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7054?vs=17084&id=17104 BRANCH default CHANGES SINCE LAST ACTION https://phab.merc

D7055: phabricator: update hgmatcher to cope with the new data format

2019-10-12 Thread Kwan (Ian Moody)
Kwan added a comment. Kwan updated this revision to Diff 17105. I'd missed out the attrs key conversion needed on py3. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7055?vs=17085&id=17105 BRANCH default CHANGES SINCE LAST ACTION https://phab.merc

D7056: phabricator: include bookmark in diff metadata

2019-10-12 Thread Kwan (Ian Moody)
Kwan added a comment. Kwan updated this revision to Diff 17106. I'd missed out the attrs key conversion needed on py3. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7056?vs=17086&id=17106 BRANCH creatediff (bookmark) on default (branch) CHANGES SIN

D7055: phabricator: update hgmatcher to cope with the new data format

2019-10-12 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > phabricator.py:155-156 > +if value.startswith(b'{') and value.endswith(b'}'): > +r1json = json.loads(value) > +r2json = json.loads(r2params[key][0]) > +if r1json != r2json: These will need c

D7061: convert: don't pass bytes to, or expect bytes from, emailparser

2019-10-12 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > martinvonz wrote in gnuarch.py:301 > Is it right to depend on the user's preferred encoding (as I think > `unifromlocal()` does)? Would it make sense to instead initialize > `self.catlogparser = emailparser.BytesParser()`? Hmm, I wasn't aware of th

D7067: sidedatacopies: only read from copies when in this mode

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY If we know we expect data from sidedata, we read them from sidedata and nothing else. This avoid looking into extra for revision without sidedata entries. S

D7068: sidedatacopies: only store an entry if it has values

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will make for a shorter storage and help use to write faster code in simple case. This change already provided a speed boost for copy tracing. For exam

D7069: copies: simplify the handling of merges

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Instead of stacking copies for both parent on the head, we move copies outside of the heap into a dedicated dictionary. The two side of merge can we merged soon

D7070: copies: extract data extraction into a `revinfo` function

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The function is build once at the beginning of the algorithm and used fetch appropriate information for each revision. This abstracts some implementation det

D7071: copies: use unchecked parentrevs function to access parent

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Since we are traveling the graph down from one head, we know we will not encounter any filtered revisions. Using the "unchecked" version is significantly fas

D7072: sidedatacopies: directly fetch copies information from sidedata

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY When using the sidedata mode, we don't need a complicated and expensive `context` object. Instead we directly fetch copies information from the sidedata (throug

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

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY When using the side data mode, we know their won't be any copy information sidedata. Skipping revision restoration give an important speed boost. In the futu

D7073: revlog: introduce a `_uncheckedflags` shortcut

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will be useful in the next changeset. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7073 A

D7075: copies: add an explicit test using multiple roots

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We explicitly add a test checking for copies of connected revision but involving a different roots. This make sure the copies coming purely from the new roots

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

2019-10-12 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This change make the code clearer by removing the revision queue. It comes without very noticeable performance impact. However the simpler code will be easier t

D7065: examples: allow the fix configuration to work from any directory

2019-10-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment. It's unfortunate that this is necessary. I'll see if I can fix fix.py to always interpret patterns relative to the repo root. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7065/new/ REVISION DETAIL https://phab.mercurial

D7065: examples: allow the fix configuration to work from any directory

2019-10-12 Thread mharbison72 (Matt Harbison)
mharbison72 added a comment. In D7065#103834 , @martinvonz wrote: > It's unfortunate that this is necessary. I'll see if I can fix fix.py to always interpret patterns relative to the repo root. I think that's the most intuitive way to con

[Bug 6203] New: Evolve loses change when resolving content-divergence

2019-10-12 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6203 Bug ID: 6203 Summary: Evolve loses change when resolving content-divergence Product: Mercurial Version: unspecified Hardware: PC OS: Linux Status: UNCONFIRMED

D7003: grep: put --diff in the first line of usage

2019-10-12 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 17117. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7003?vs=16916&id=17117 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7003/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7003 AFFEC

D7078: automation: capture additional exception when formatting

2019-10-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I started encountering this for some reason. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7078 AFFECTED FILES contrib/automatio

D7077: contrib: update to latest Windows package versions

2019-10-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Let's keep modern. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7077 AFFECTED FILES contrib/install-windows-dependencies.ps1 C

D6987: debugstrip: add debugstrip to core

2019-10-12 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh retitled this revision from "strip: move strip extension to core as debugstrip" to "debugstrip: add debugstrip to core". navaneeth.suresh updated this revision to Diff 17120. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6987?vs=16914&id=

D7079: py3: convert cwd to native string when running `fix`

2019-10-12 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This prevents a bunch of failures on Windows. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7079 AFFECTED FILES hgext/fix.py

D7080: hghave: use a native string to invoke the `black` command

2019-10-12 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Windows can't create a process based on bytes. Apparently only the output test in `matchoutput` wants bytes. REPOSITORY rHG Mercurial REVISION DETAIL h

D7081: tests: open file in binary mode in test-upgrade-repo.t

2019-10-12 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Otherwise the file sizes printed in the output diverge from other platforms. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7081

D6993: black: add a pyproject.toml that contains our black settings

2019-10-12 Thread mharbison72 (Matt Harbison)
mharbison72 added a comment. I'm baffled, but this causes test-install.t to fail on Windows: $ ./run-tests.py --local test-install.t running 1 tests using 1 parallel processes --- c:/Users/Matt/hg/tests/test-install.t +++ c:/Users/Matt/hg/tests/test-install.t.err @@

D7081: tests: open file in binary mode in test-upgrade-repo.t

2019-10-12 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Oh, I've been meaning to track this one down. Good catch. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7081/new/ REVISION DETAIL https://pha

D7079: py3: convert cwd to native string when running `fix`

2019-10-12 Thread mharbison72 (Matt Harbison)
Closed by commit rHG2d1f9880af1b: py3: convert cwd to native string when running `fix` (authored by mharbison72). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7079?vs=17121&id=1712

D7080: hghave: use a native string to invoke the `black` command

2019-10-12 Thread mharbison72 (Matt Harbison)
Closed by commit rHG138ac8cbce60: hghave: use a native string to invoke the `black` command (authored by mharbison72). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7080?vs=17122&id

D7081: tests: open file in binary mode in test-upgrade-repo.t

2019-10-12 Thread mharbison72 (Matt Harbison)
Closed by commit rHG86b26f20146d: tests: open file in binary mode in test-upgrade-repo.t (authored by mharbison72). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7081?vs=17123&id=17