D8024: profiling: flush stdout before writing profile to stderr

2020-01-27 Thread spectral (Kyle Lippincott)
spectral created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY On py3, stdout and stderr appear to be buffered and this causes my command's output to be intermixed with the profiling output. REPOSITORY rHG Mercurial

D8023: chg: read CHGORIG_ values from env and handle these appropriately

2020-01-27 Thread spectral (Kyle Lippincott)
spectral created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python3.7+ will "coerce" the locale (specifically LC_CTYPE) in many situations, and this can cause chg to not start. My previous fix in D7550

D8021: chg: switch to using global `environ` instead of envp from main

2020-01-27 Thread spectral (Kyle Lippincott)
spectral created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY My followup patch wants to modify the environment before we call setenv on the chg server process (to add items), and that won't be handled properly if we use

D8022: chg: pass copies of some envvars so we can detect py37+ modifications

2020-01-27 Thread spectral (Kyle Lippincott)
spectral created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python3.7+ will "coerce" some variables in the environment to different values. Currently this is just LC_CTYPE, which will be coerced to the first of

D7450: packaging: add support for PyOxidizer

2020-01-27 Thread mharbison72 (Matt Harbison)
mharbison72 added a comment. In D7450#118284 , @martinvonz wrote: > I'd be very happy to queue this as soon as @mharbison72's request for Windows has been addressed (I think that was all, right?). Yes. I'm still curious about the

Re: Fixing default behavior of bookmarks.

2020-01-27 Thread Valentin Gatien-Baron
Hi, I've finally found some time to reply to this. I couldn't find a place that explains concisely the behavior of bookmarks, which I thought would be useful to think through this. I included some notes [1], if that's useful to someone else. A tiny bit of context on our use of bookmarks.

D7450: packaging: add support for PyOxidizer

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment. I'd be very happy to queue this as soon as @mharbison72's request for Windows has been addressed (I think that was all, right?). We (Google) would like to use it for macOS packaging too. We may also end up using it on Linux so we don't break when the system

D8020: rust: remove an unnecessary set of parentheses

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added subscribers: mercurial-devel, kevincox. Herald added a reviewer: hg-reviewers. REVISION SUMMARY My build complained about this. I guess it started after I upgraded rustc. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D8019: rust-node: avoid meaningless read at the end of odd prefix

2020-01-27 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added subscribers: mercurial-devel, kevincox. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This should be heavily factored out by the CPU branch predictor anyway. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D7794: rust-nodemap: generic NodeTreeVisitor

2020-01-27 Thread gracinet (Georges Racinet)
Closed by commit rHG796d05f3fa84: rust-nodemap: generic NodeTreeVisitor (authored by gracinet). gracinet marked an inline comment as done. This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review".

D7791: rust-nodemap: NodeMap trait with simplest implementation

2020-01-27 Thread gracinet (Georges Racinet)
Closed by commit rHGe52401a95b94: rust-nodemap: NodeMap trait with simplest implementation (authored by gracinet). gracinet marked 2 inline comments as done. This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state

D7793: rust-nodemap: mutable NodeTree data structure

2020-01-27 Thread gracinet (Georges Racinet)
Closed by commit rHGa19331456d48: rust-nodemap: mutable NodeTree data structure (authored by gracinet). 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

D7792: rust-nodemap: abstracting the indexing

2020-01-27 Thread gracinet (Georges Racinet)
Closed by commit rHG220d4d2e3185: rust-nodemap: abstracting the indexing (authored by gracinet). gracinet marked an inline comment as done. This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review".

D7790: rust-node: handling binary Node prefix

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > gracinet wrote in node.rs:226 > yes, indeed. > > current callers from `nodemap` work either on full Nodes or (the visitor) by > explicitely bounding with `prefix.len()`, but it's safer to protect it > inconditonally. > > I think a simple

D7794: rust-nodemap: generic NodeTreeVisitor

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added inline comments. gracinet marked 2 inline comments as done. INLINE COMMENTS > martinvonz wrote in nodemap.rs:300 > would something like `block_index` be clearer? I found it to be clearer for the emitter, but in the iterator implementation, it expresses what's to be done next,

D7790: rust-node: handling binary Node prefix

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added inline comments. INLINE COMMENTS > martinvonz wrote in node.rs:226 > Should we check here that `i < self.len()`? I'm especially thinking of the > case of an odd-length prefix where we would otherwise silently return 0. yes, indeed. current callers from `nodemap` work either on

D7794: rust-nodemap: generic NodeTreeVisitor

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. martinvonz accepted this revision. INLINE COMMENTS > nodemap.rs:300 > +prefix: NodePrefixRef<'p>, > +visit: usize, > +nybble_idx: usize, would something like `block_index` be clearer? > nodemap.rs:312 > + > +impl<'n, 'p> Iterator for

D7791: rust-nodemap: NodeMap trait with simplest implementation

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > gracinet wrote in nodemap.rs:153 > Perhaps a better name would be better than this `has_` that indeed feels > boolean? > > `check_prefix`? `confirm` ? > > Previous naming was `validate_candidate`, but that very same name is used at > the

D7790: rust-node: handling binary Node prefix

2020-01-27 Thread gracinet (Georges Racinet)
Closed by commit rHG9896a8d0d3d2: rust-node: handling binary Node prefix (authored by gracinet). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7790?vs=19630=19643 CHANGES SINCE

D7789: rust-revlog: a trait for the revlog index

2020-01-27 Thread gracinet (Georges Racinet)
Closed by commit rHG3fb39dc2e356: rust-revlog: a trait for the revlog index (authored by gracinet). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7789?vs=19629=19642 CHANGES SINCE

D7790: rust-node: handling binary Node prefix

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
This revision is now accepted and ready to land. martinvonz added inline comments. martinvonz accepted this revision. INLINE COMMENTS > node.rs:103 > + > +impl<'a> NodePrefixRef<'a> { > +pub fn len() -> usize { The lifetime parameter doesn't seem to be used, so make it anonymous? (I.e.,

D8018: cmdutil: change check_incompatible_arguments() *arg to single iterable

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This makes it clearer on the call-sites that the first argument is special. Thanks to Yuya for the suggestion. REPOSITORY rHG Mercurial BRANCH default

D7993: merge: use check_incompatible_arguments() for --abort

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment. In D7993#118162 , @yuja wrote: >> +cmdutil.check_incompatible_arguments(opts, b'abort', b'rev', b'preview') > > It's a bit late, but I feel the arguments of `check_incompatible_arguments()` > is confusing

D7450: packaging: add support for PyOxidizer

2020-01-27 Thread mharbison72 (Matt Harbison)
mharbison72 added a comment. In D7450#118154 , @mharbison72 wrote: > I think this can land after the Windows options are added. > >> So we don't need to worry about vendoring any Rust code to initially support PyOxidizer. > > Does

D7819: rust-nodemap: core implementation for shortest

2020-01-27 Thread gracinet (Georges Racinet)
gracinet marked an inline comment as done. gracinet updated this revision to Diff 19640. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7819?vs=19639=19640 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7819/new/ REVISION

D7819: rust-nodemap: core implementation for shortest

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added inline comments. gracinet marked 3 inline comments as done. INLINE COMMENTS > kevincox wrote in nodemap.rs:337 > Can you describe the return value in the doc comment. Done > martinvonz wrote in nodemap.rs:575 > I'm fine with either. We'll expose it as "shortest" in the python

D7796: rust-nodemap: input/output primitives

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added inline comments. gracinet marked 2 inline comments as done. INLINE COMMENTS > kevincox wrote in nodemap.rs:268 > I thought about this more and I think I am okay doing it this way. It seems > like this should be well defined as long as there is no padding. However on > that note

D7794: rust-nodemap: generic NodeTreeVisitor

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added inline comments. gracinet marked 2 inline comments as done. INLINE COMMENTS > martinvonz wrote in nodemap.rs:264-269 > There will only be a valid result if this is a leaf, so it might be better to > combine `leaf` and `opt` into one `Option>` so the caller > cannot mistake a

D7793: rust-nodemap: mutable NodeTree data structure

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added inline comments. INLINE COMMENTS > kevincox wrote in nodemap.rs:158 > This strikes me as a weird name. The fact that it is an adjective rather than > a noun is a hint. Can you rename to answer "Growable what?" In a previous version, I was calling it `mutable` (also an adjective,

D7792: rust-nodemap: abstracting the indexing

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added inline comments. gracinet marked 2 inline comments as done. INLINE COMMENTS > kevincox wrote in nodemap.rs:193 > I would add a `self.is_empty()` helper. It's good practice for anything that > has a `.len()`. Sure REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION

D7791: rust-nodemap: NodeMap trait with simplest implementation

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added inline comments. gracinet marked 3 inline comments as done. INLINE COMMENTS > kevincox wrote in nodemap.rs:37 > Can you please add doc-comments for this? I find that documenting trait > methods is especially important. Sure, indeed it's more important than with the `impl`. >

D7790: rust-node: handling binary Node prefix

2020-01-27 Thread gracinet (Georges Racinet)
gracinet added a comment. > Depends on the definition of NodePrefixRef. I don't think there would be any extra allocation if you define it like this: pub enum NodePrefixRef<'a> { Full(&'a Node), Prefix(&'a NodePrefix), } That's an interesting idea,

D7819: rust-nodemap: core implementation for shortest

2020-01-27 Thread gracinet (Georges Racinet)
gracinet updated this revision to Diff 19639. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7819?vs=19331=19639 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7819/new/ REVISION DETAIL

D7797: rust-nodemap: pure Rust example

2020-01-27 Thread gracinet (Georges Racinet)
gracinet edited the summary of this revision. gracinet updated this revision to Diff 19637. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7797?vs=19046=19637 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7797/new/

D7798: rust-nodemap: special case for prefixes of NULL_NODE

2020-01-27 Thread gracinet (Georges Racinet)
gracinet updated this revision to Diff 19638. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7798?vs=19330=19638 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7798/new/ REVISION DETAIL

D7796: rust-nodemap: input/output primitives

2020-01-27 Thread gracinet (Georges Racinet)
gracinet edited the summary of this revision. gracinet updated this revision to Diff 19636. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7796?vs=19329=19636 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7796/new/

D7795: rust-nodemap: insert method

2020-01-27 Thread gracinet (Georges Racinet)
gracinet updated this revision to Diff 19635. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7795?vs=19328=19635 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7795/new/ REVISION DETAIL

D7794: rust-nodemap: generic NodeTreeVisitor

2020-01-27 Thread gracinet (Georges Racinet)
gracinet edited the summary of this revision. gracinet updated this revision to Diff 19634. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7794?vs=19327=19634 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7794/new/

D7793: rust-nodemap: mutable NodeTree data structure

2020-01-27 Thread gracinet (Georges Racinet)
gracinet updated this revision to Diff 19633. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7793?vs=19326=19633 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7793/new/ REVISION DETAIL

D7791: rust-nodemap: NodeMap trait with simplest implementation

2020-01-27 Thread gracinet (Georges Racinet)
gracinet retitled this revision from "rust-nodemap: NodeMap trait with simplest implementor" to "rust-nodemap: NodeMap trait with simplest implementation". gracinet updated this revision to Diff 19631. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D7792: rust-nodemap: abstracting the indexing

2020-01-27 Thread gracinet (Georges Racinet)
gracinet updated this revision to Diff 19632. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7792?vs=19325=19632 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7792/new/ REVISION DETAIL

D7790: rust-node: handling binary Node prefix

2020-01-27 Thread gracinet (Georges Racinet)
gracinet edited the summary of this revision. gracinet updated this revision to Diff 19630. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7790?vs=19039=19630 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7790/new/

D7789: rust-revlog: a trait for the revlog index

2020-01-27 Thread gracinet (Georges Racinet)
gracinet updated this revision to Diff 19629. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7789?vs=19038=19629 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7789/new/ REVISION DETAIL

mercurial@44180: 6 new changesets

2020-01-27 Thread Mercurial Commits
6 new changesets in mercurial: https://www.mercurial-scm.org/repo/hg/rev/2b6632d64328 changeset: 44175:2b6632d64328 user:Martin von Zweigbergk date:Fri Jan 24 16:00:54 2020 -0800 summary: merge: check that there are no conflicts after --abort

D7906: rebase: define base in only place in defineparents()

2020-01-27 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > pulkit wrote in rebase.py:1811 > I am not sure why we are doing `bases[i] = bases[0]` here? (TBH I didn't try > to understand the whole logic, mostly only the diff) Doing it only for consistency with `newps`. `bases` and `newps` should be

D7906: rebase: define base in only place in defineparents()

2020-01-27 Thread pulkit (Pulkit Goyal)
pulkit added inline comments. INLINE COMMENTS > rebase.py:1811 > +newps[0], newps[i] = newps[i], newps[0] > +bases[0], bases[i] = bases[i], bases[0] > + I am not sure why we are doing `bases[i] = bases[0]` here? (TBH I didn't try to understand the whole logic,

Re: Nlnet funding for transitioning out of SHA-1

2020-01-27 Thread Pierre-Yves David
On 1/26/20 8:57 PM, Joerg Sonnenberger wrote: On Wed, Jan 15, 2020 at 05:53:06PM +0100, Raphaël Gomès wrote: Right now I can see the following high level steps     - Update the core code to be able to deal with multiple hashing functions     - Update the network protocol to deal with

D7993: merge: use check_incompatible_arguments() for --abort

2020-01-27 Thread yuja (Yuya Nishihara)
yuja added a comment. > +cmdutil.check_incompatible_arguments(opts, b'abort', b'rev', b'preview') It's a bit late, but I feel the arguments of `check_incompatible_arguments()` is confusing since `b'abort'` isn't the same kind of arguments as the others. I think `(opts, b'abort',

Re: D7993: merge: use check_incompatible_arguments() for --abort

2020-01-27 Thread Yuya Nishihara
> +cmdutil.check_incompatible_arguments(opts, b'abort', b'rev', b'preview') It's a bit late, but I feel the arguments of `check_incompatible_arguments()` is confusing since `b'abort'` isn't the same kind of arguments as the others. I think `(opts, b'abort', [b'rev', b'preview'])` is more

mercurial@44174: 6 new changesets (5 on stable)

2020-01-27 Thread Mercurial Commits
6 new changesets (5 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/5d85e9ddc7b9 changeset: 44169:5d85e9ddc7b9 branch: stable parent: 44157:624fe53ce1e7 user:Matt Harbison date:Sat Jan 25 01:06:46 2020 -0500 summary: phabricator: fix a crash

D7932: [RFC]debugbackups: introduce command to interact with strip backups

2020-01-27 Thread marmoute (Pierre-Yves David)
marmoute added a comment. Can we call it `debugbackupbundle` for clarify? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7932/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7932 To: pulkit, #hg-reviewers Cc: marmoute, durin42, mercurial-devel

D7967: exchange: recognize changegroup3 bundles in `getbundlespec()`

2020-01-27 Thread marmoute (Pierre-Yves David)
marmoute added a comment. I can confirm the spec version number are different to the changegroup version number. For the rest. I'll try to have a look soon. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7967/new/ REVISION DETAIL