D5638: branchmap: encapsulate cache updating in the map itself

2019-02-08 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG328ca3b9e545: branchmap: encapsulate cache updating in the map itself (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D5635: branchmap: make branchcache responsible for reading

2019-02-05 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGbf7fb97aecf1: branchmap: make branchcache responsible for reading (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D5637: branchmap: add some clarifications and clean up flow

2019-02-05 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc795c462b1d6: branchmap: add some clarifications and clean up flow (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D5636: branchmap: updating triggers a write

2019-02-05 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGeb7ce452e0fb: branchmap: updating triggers a write (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5636?vs=13331=13807

D5638: branchmap: encapsulate cache updating in the map itself

2019-01-28 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 13543. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5638?vs=13502=13543 REVISION DETAIL https://phab.mercurial-scm.org/D5638 AFFECTED FILES contrib/perf.py mercurial/branchmap.py mercurial/localrepo.py

D5635: branchmap: make branchcache responsible for reading

2019-01-28 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 13542. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5635?vs=13501=13542 REVISION DETAIL https://phab.mercurial-scm.org/D5635 AFFECTED FILES contrib/perf.py mercurial/branchmap.py CHANGE DETAILS diff --git

D5638: branchmap: encapsulate cache updating in the map itself

2019-01-26 Thread mjpieters (Martijn Pieters)
mjpieters added inline comments. INLINE COMMENTS > martinvonz wrote in perf.py:2299 > Same here: I think this needs to be made compatible with both versions > (before and after this patch) I'll wait for confirmation; see the other patch. > martinvonz wrote in localrepo.py:2077 > Hmm, it's

D5638: branchmap: encapsulate cache updating in the map itself

2019-01-26 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 13502. mjpieters marked an inline comment as done. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5638?vs=1=13502 REVISION DETAIL https://phab.mercurial-scm.org/D5638 AFFECTED FILES contrib/perf.py

D5635: branchmap: make branchcache responsible for reading

2019-01-26 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 13501. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5635?vs=13330=13501 REVISION DETAIL https://phab.mercurial-scm.org/D5635 AFFECTED FILES contrib/perf.py mercurial/branchmap.py CHANGE DETAILS diff --git

D5636: branchmap: updating triggers a write

2019-01-26 Thread mjpieters (Martijn Pieters)
mjpieters added inline comments. INLINE COMMENTS > martinvonz wrote in discovery.py:242-243 > Indentation seems bad (seemed bad before too) It's a generator expression as single argument. I was deliberately not making style changes in these patches, so I didn't touch the indentation here. If

D5635: branchmap: make branchcache responsible for reading

2019-01-26 Thread mjpieters (Martijn Pieters)
mjpieters added a subscriber: yuja. mjpieters added inline comments. INLINE COMMENTS > martinvonz wrote in perf.py:2326 > As I was recently reminded by Yuya, the perf commands are supposed to be > compatible with older versions of hg too, and this doesn't seem to be > compatible with the

D5290: branchmap: rename partial -> bcache

2019-01-25 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3461814417f3: branchmap: rename partial - bcache (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5290?vs=13329=13490

D5290: branchmap: rename partial -> bcache

2019-01-21 Thread mjpieters (Martijn Pieters)
mjpieters added a comment. @yuja: you wanted separate commits, you got separate commits. :-) (and apologies for taking so long) REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5290 To: mjpieters, #hg-reviewers Cc: yuja, mercurial-devel

D5292: branchmap: make it easier for extensions not to break branchcache

2019-01-21 Thread mjpieters (Martijn Pieters)
mjpieters abandoned this revision. mjpieters added a comment. This would need more thought then; the evolve/topic/topicmap codebase wraps the whole branchmap.branchcache class and mucks about with a context manager to re-instate the right name in the branchmap globals so super() doesn't

D5638: branchmap: encapsulate cache updating in the map itself

2019-01-21 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Rather than have a repository update the cache, move handling of cache updates into the branchmap module, in the form of a custom mapping class. This makes

D5637: branchmap: add some clarifications and clean up flow

2019-01-21 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY - Remove indentation where it is not needed. - Swap the subset test branches to follow along logically and put the 'empty' case last. REPOSITORY rHG

D5635: branchmap: make branchcache responsible for reading

2019-01-21 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Encapsulate reading in a classmethod, to make it clear what kind of object is being handled. This is part of a stack of refactoring changes to help

D5636: branchmap: updating triggers a write

2019-01-21 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Rather than separate updating and writing, create a subclass that doesn't write on update. This minimises chances we forget to write out updates somewhere.

D5290: branchmap: rename partial -> bcache

2019-01-21 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 13329. mjpieters edited the summary of this revision. mjpieters retitled this revision from "branchmap: refactor for better encapsulation" to "branchmap: rename partial -> bcache". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D5290: branchmap: refactor for better encapsulation

2018-11-22 Thread mjpieters (Martijn Pieters)
mjpieters added a comment. The goal of this refactor is to bring clarity to the branchmap cache behaviour, and to make it easier to add performance improvements (in an upcoming additional series of patches). REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5290

D5292: branchmap: make it easier for extensions not to break branchcache

2018-11-21 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The _branchcache global gives us a reference for super() to use even if an extension subclasses branchmap.branchcache then replaces the class in the module.

D5064: style: run black on a subset of mercurial

2018-11-20 Thread mjpieters (Martijn Pieters)
mjpieters added a comment. In https://phab.mercurial-scm.org/D5064#78545, @av6 wrote: > I look at the changes and see nitpicks at best. On the one hand, black proved better than any linter that we can already write consistent code. On the other, if black were a linter... I'd switch to

D5290: branchmap: refactor for better encapsulation

2018-11-20 Thread mjpieters (Martijn Pieters)
mjpieters 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/D5290 AFFECTED FILES contrib/perf.py mercurial/branchmap.py mercurial/discovery.py

D5111: branchmap: remove redundant sort

2018-10-16 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG5644f7c8982e: branchmap: remove redundant sort (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5111?vs=12157=12158

D5111: branchmap: remove redundant sort

2018-10-16 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY There is absoluty no benefit in sorting a list that's being merged into a set on the next line. The changelog.ancestors() call later on also doesn't benefit

D5105: style: drop requirement to only use single lines between top-level objects

2018-10-16 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG47084b5ffd80: style: drop requirement to only use single lines between top-level objects (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D5105: style: drop requirement to only use single lines between top-level objects

2018-10-14 Thread mjpieters (Martijn Pieters)
mjpieters added a subscriber: indygreg. mjpieters added a comment. This was split out from https://phab.mercurial-scm.org/D5064 (cc @indygreg ) REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5105 To: mjpieters, #hg-reviewers Cc: indygreg, mercurial-devel

D5064: style: run black on a subset of mercurial

2018-10-14 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 12135. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5064?vs=12059=12135 REVISION DETAIL https://phab.mercurial-scm.org/D5064 AFFECTED FILES contrib/import-checker.py mercurial/cacheutil.py

D5105: style: drop requirement to only use single lines between top-level objects

2018-10-14 Thread mjpieters (Martijn Pieters)
mjpieters 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/D5105 AFFECTED FILES contrib/check-commit CHANGE DETAILS diff --git a/contrib/check-commit

D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8cf459d8b111: py3: use py3 as the test tag, dropping the k (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters added a comment. Note: I undid the change to `mercurial/thirdparty/zope/interface/_compat.py` as it should not have been changed to begin with. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5079 To: mjpieters, #hg-reviewers, pulkit, durin42 Cc:

D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 12091. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5079?vs=12068=12091 REVISION DETAIL https://phab.mercurial-scm.org/D5079 AFFECTED FILES mercurial/help.py tests/hghave.py tests/run-tests.py

D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters 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/D5079 AFFECTED FILES mercurial/help.py mercurial/thirdparty/zope/interface/_compat.py

D5064: style: run black on a subset of mercurial

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 12059. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5064?vs=12047=12059 REVISION DETAIL https://phab.mercurial-scm.org/D5064 AFFECTED FILES contrib/check-commit contrib/import-checker.py

D5064: style: run black on a subset of mercurial

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 12047. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5064?vs=12030=12047 REVISION DETAIL https://phab.mercurial-scm.org/D5064 AFFECTED FILES mercurial/cacheutil.py mercurial/diffhelper.py

D5064: style: run black on a subset of mercurial

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters added a comment. The `import` parentheses collapsing is described here: https://github.com/ambv/black#parentheses. The behavior is not configurable. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5064 To: mjpieters, indygreg, durin42, #hg-reviewers

D5064: style: run black on a subset of mercurial

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. mjpieters added reviewers: indygreg, durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This applied black to the 20 smallest files in mercurial/: ls -S1 mercurial/*.py | tail -n20 | xargs black

D4280: perf: time loading branchmap caches

2018-08-15 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGf16c3efe35e3: perf: time loading branchmap caches (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4280?vs=10352=10373

D4281: branchmap: load branchmap as an iterable

2018-08-15 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9a800691f075: branchmap: load branchmap as an iterable (authored by mjpieters, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4281?vs=10353=10374

D4281: branchmap: load branchmap as an iterable

2018-08-13 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This avoids reading all the file into memory if the cache turns out to be invalid. REPOSITORY rHG Mercurial REVISION DETAIL

D4280: perf: time loading branchmap caches

2018-08-13 Thread mjpieters (Martijn Pieters)
mjpieters 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/D4280 AFFECTED FILES contrib/perf.py CHANGE DETAILS diff --git a/contrib/perf.py b/contrib/perf.py

Re: [PATCH 1 of 2 v2] utils: create a context manager to handle timing

2018-08-02 Thread Martijn Pieters
+timing_stats = timedcmstats(level=timedcm._nested) > > +try: > > +yield timing_stats > > +finally: > > +timing_stats.elapsed = timer() - timing_stats.start > > +timedcm._nested -= 1 > > + > > +timedcm._nest

[PATCH] util: make new timedcmstats class Python 3 compatible

2018-08-02 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1533239583 -3600 # Thu Aug 02 20:53:03 2018 +0100 # Branch stable # Node ID d7c68ee641ff02542680bdaa4bff95a348db688e # Parent 07ca3b8354d59c70db5f10448e53d4bbfd50e72e # EXP-Topic debugextensions util: make new timedcmstats class Python 3

[PATCH 2 of 2 v3] manifest: persist the manifestfulltext cache

2018-08-01 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1533058674 -7200 # Tue Jul 31 19:37:54 2018 +0200 # Branch stable # Node ID 92180b2297bd8bff6e2f3bc9d6e4ea71ed9e # Parent 23e31b60983e3fb78aeb8822de8c630798f46447 # EXP-Topic persistentmanifestcache manifest: persist

[PATCH 1 of 2 v3] debug: allow specifying a manifest node rather than a revision

2018-08-01 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1533157442 -7200 # Wed Aug 01 23:04:02 2018 +0200 # Branch stable # Node ID 23e31b60983e3fb78aeb8822de8c630798f46447 # Parent e06a10d3b926844b5a933ec2b8f2b70cf1fb941e # EXP-Topic persistentmanifestcache debug: allow specifying a manifest

Re: [PATCH 1 of 2 v2] utils: create a context manager to handle timing

2018-08-01 Thread Martijn Pieters
I accidentally added a v2 flag to this. Mea Culla, there is no v1. Martijn -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

[PATCH 1 of 2 v2] utils: create a context manager to handle timing

2018-08-01 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1533132341 -7200 # Wed Aug 01 16:05:41 2018 +0200 # Branch stable # Node ID 2bad2ee57e26f05f99a81715e781f7978515b705 # Parent 545a3e6650cd8f7e19c0f0256082837a33bea029 # EXP-Topic debugextensions utils: create a context manager to handle

[PATCH 2 of 2 v2] extensions: add detailed loading information

2018-08-01 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1533132413 -7200 # Wed Aug 01 16:06:53 2018 +0200 # Branch stable # Node ID 07ca3b8354d59c70db5f10448e53d4bbfd50e72e # Parent 2bad2ee57e26f05f99a81715e781f7978515b705 # EXP-Topic debugextensions extensions: add detailed loading information

[PATCH 2 of 2 v2] manifest: persist the manifestfulltext cache

2018-08-01 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1533058674 -7200 # Tue Jul 31 19:37:54 2018 +0200 # Branch stable # Node ID b17ebb3cc106e209c0f8b40fc10e45656a9b8fd2 # Parent aeabcb9ce5d398de42f623320873a789b94ba2b8 # EXP-Topic persistentmanifestcache manifest: persist

[PATCH 1 of 2 v2] debug: allow specifying a manifest node rather than a revision

2018-08-01 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1533058668 -7200 # Tue Jul 31 19:37:48 2018 +0200 # Branch stable # Node ID aeabcb9ce5d398de42f623320873a789b94ba2b8 # Parent e06a10d3b926844b5a933ec2b8f2b70cf1fb941e # EXP-Topic persistentmanifestcache debug: allow specifying a manifest

[PATCH experimental] manifest: persist the manifestfulltext cache

2018-07-16 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1531769057 -3600 # Mon Jul 16 20:24:17 2018 +0100 # Node ID 6b76d41520cded0655a6214fdd515014a23b6b9c # Parent 2a227782e75426a3e4408273a9a4eebe79dfdcea # EXP-Topic persistentmanifestcache manifest: persist the manifestfulltext cache

[PATCH] fncache: avoid loading the filename cache when not actually modifying it

2018-07-11 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters # Date 1531315693 -3600 # Wed Jul 11 14:28:13 2018 +0100 # Node ID 39bc6540388e79da1a670fcd382aa77b8aa27224 # Parent 4d5fb4062f0bb159230062701461fa6cab9b539b # EXP-Topic fncache_prevent_load_when_exists fncache: avoid loading the filename cache

Re: [PATCH remotenames-ext] tests: re-order tags and bookmarks in tracking test

2017-09-28 Thread Martijn Pieters
Review handled on Phabricator, at https://phab.mercurial-scm.org/D830 On 27 September 2017 at 13:59, Martijn Pieters <m...@zopatista.com> wrote: > # HG changeset patch > # User Martijn Pieters <mjpiet...@fb.com> > # Date 1506517103 -3600 > # Wed Sep 27 13:58:2

[PATCH remotenames-ext] tests: re-order tags and bookmarks in tracking test

2017-09-27 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1506517103 -3600 # Wed Sep 27 13:58:23 2017 +0100 # Node ID 64cc414eabb05a260f664682516c264cce04d02c # Parent 5289a6772ae59a8da42c75c508152997fcc1bb1a tests: re-order tags and bookmarks in tracking test Core

D472: extensions: make wrapfunction() return a context manager

2017-08-24 Thread mjpieters (Martijn Pieters)
mjpieters accepted this revision. mjpieters added a comment. I was being too strict; like `open()` it's sometimes fine to apply the action in the constructor. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D472 To: martinvonz, #hg-reviewers, quark, mjpieters

D472: extensions: make wrapfunction() return a context manager

2017-08-23 Thread mjpieters (Martijn Pieters)
mjpieters added inline comments. INLINE COMMENTS > extensions.py:408-412 > +origfn = getattr(container, funcname) > +assert callable(origfn) > +wrap = bind(wrapper, origfn) > +_updatewrapper(wrap, origfn, wrapper) > +setattr(container, funcname, wrap)

Re: [PATCH py3 resend] py3: initial type hinting stubs

2017-05-18 Thread Martijn Pieters
On 18 May 2017, at 19:22, Gregory Szorc <gregory.sz...@gmail.com> wrote: > On Wed, Mar 15, 2017 at 11:09 AM, Martijn Pieters <m...@zopatista.com > <mailto:m...@zopatista.com>> wrote: > # HG changeset patch > # User Martijn Pieters <mjpiet...@fb.com <mailto:mj

[PATCH] py3: initial type hinting stubs

2017-03-12 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1489356745 25200 # Sun Mar 12 15:12:25 2017 -0700 # Node ID c363e933a66bb85ddbfe8301bbfd246ecaad95d6 # Parent 719e64bf9ec2d7b8e86b6550a5d193b3c67944d1 py3: initial type hinting stubs These are stub files to b

[PATCH] config: avoid using a mutable default

2017-03-12 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1489348572 25200 # Sun Mar 12 12:56:12 2017 -0700 # Node ID 22c38e571b5ccf3bb6d9f075526170954843f37a # Parent 719e64bf9ec2d7b8e86b6550a5d193b3c67944d1 config: avoid using a mutable default Nothing *currently* m

[PATCH V2] config: honour the trusted flag in ui.configint

2017-03-12 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1489340031 25200 # Sun Mar 12 10:33:51 2017 -0700 # Node ID 55a2a84cb75e7bbfb9dcd510b686de417fb9dfab # Parent abf029200e198878a4576a87e095bd8d77d9cea9 config: honour the trusted flag in ui.configint diff --git a/mer

[PATCH] config: honour the trusted flag in ui.configint

2017-03-11 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1489299699 28800 # Sat Mar 11 22:21:39 2017 -0800 # Node ID 8be2b42b977c09ca7405dc671e160300a887aa5e # Parent abf029200e198878a4576a87e095bd8d77d9cea9 config: honour the trusted flag in ui.configint diff --git a/mer

Re: [PATCH 5 of 8 py3 v3] dispatch: enforce bytes when converting boolean flags to config items

2017-03-11 Thread Martijn Pieters
_ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Re: [PATCH 2 of 3] py3: factor out bytechr() function

2017-03-11 Thread Martijn Pieters
join` only, you want to use a list comp here, not a generator expression, as it is faster and more memory efficient: _xchar = pycompat.bytechr _keepalnum = ''.join(c for c in map(_xchar, range(256)) if not c.isalnum()) --

Re: [PATCH py3] ui: construct _keepalnum list in a python3-friendly way

2017-02-18 Thread Martijn Pieters
On 16 Feb 2017, at 16:35, Augie Fackler > wrote: > +if pycompat.ispy3: > +_unicodes = [bytes([c]).decode('latin1') for c in range(256)] > +_notalnum = [s.encode('latin1') for s in _unicodes if not s.isalnum()] ... > +_keepalnum =

Re: [PATCH evolve-ext] wireproto: chunking and compression is forthwith to be handled by hgweb

2016-11-30 Thread Martijn Pieters
"Mercurial-devel on behalf of Martijn Pieters" < mercurial-devel-boun...@mercurial-scm.org on behalf of m...@zopatista.com> wrote: > > # HG changeset patch > # User Martijn Pieters <mjpiet...@fb.com> > # Date 1480435818 0 > # Tue Nov 29 16:10:18 201

Re: mercurial@30541: 92 new changesets

2016-11-30 Thread Martijn Pieters
vec, > debugrename, debugwireargs?) > > (Or am I missing something obvious?) > This was caused by remotefilelog looking for the debugindex command in the command table without importing the new mercurial.debugcommand module; I've committ

Re: [PATCH 5 of 5] posix: give checklink a fast path that cache the check file and is read only

2016-11-29 Thread Martijn Pieters
On 29 November 2016 at 20:43, Martijn Pieters <m...@zopatista.com> wrote: > On 17 November 2016 at 18:44, Mads Kiilerich <m...@kiilerich.com> wrote: > > > > # HG changeset patch > > # User Mads Kiilerich <mad...@unity3d.com> > > # Date 1421194526 -3

Re: [PATCH 5 of 5] posix: give checklink a fast path that cache the check file and is read only

2016-11-29 Thread Martijn Pieters
ile or directory + [1] $ cat .hg/localtags - 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo - 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar + cat: .hg/localtags: No such file or directory + [1] $ cat ../b/.hgtags 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo ERROR: test-hardlinks.t output chan

[PATCH evolve-ext] wireproto: chunking and compression is forthwith to be handled by hgweb

2016-11-29 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1480435818 0 # Tue Nov 29 16:10:18 2016 + # Node ID 28a092ed406e930894c59eb88d645221abddc307 # Parent cb2bac3253fbd52894ffcb4719a148fe6a3da38b wireproto: chunking and compression is forthwith to be handled by

Re: [PATCH 3 of 3] py3: update test-check-py3-compat.t output

2016-11-28 Thread Martijn Pieters
il.py: error importing: No module > named 'mercurial.cffi' (error at check-py3-compat.py:*) > > Ok, but you'll get a different error if you have cffi installed. > Hrm, so how can we best make this conditional? > _______

Re: [PATCH] fsmonitor: be robust in the face of bad state

2016-11-25 Thread Martijn Pieters
file.write(clock + '\0') > @@ -98,8 +104,6 @@ > if notefiles: > file.write('\0'.join(notefiles)) > file.write('\0') > -finally: > -file.close() > > def invalidate(self): > try: &g

Re: [PATCH 3 of 6] patch: migrate to util.iterfile

2016-11-15 Thread Martijn Pieters
http://bugs.python.org/issue1633941, where you can provoke the bug by using ^Z while reading from stdin. Also, before Python 2.7.4 (including 2.6) there is no EINTR handling *at all*, all reading operations that can be interrupted are affected. See http://bugs.python.org/issue12268, which aimed at fi

Re: [PATCH 1 of 4 py3] error: wrap super() init call in try/except

2016-11-11 Thread Martijn Pieters
> On 11 Nov 2016, at 12:54, Yuya Nishihara <y...@tcha.org> wrote: > > On Thu, 10 Nov 2016 17:01:22 +, Martijn Pieters wrote: >>> On 10 Nov 2016, at 13:09, Yuya Nishihara <y...@tcha.org> wrote: >>> On Wed, 09 Nov 2016 11:23:38 -0500, Augie Fackler wrote

Re: [PATCH 1 of 4 py3] error: wrap super() init call in try/except

2016-11-10 Thread Martijn Pieters
> On 10 Nov 2016, at 13:09, Yuya Nishihara wrote: > > On Wed, 09 Nov 2016 11:23:38 -0500, Augie Fackler wrote: >> # HG changeset patch >> # User Augie Fackler >> # Date 1476019730 14400 >> # Sun Oct 09 09:28:50 2016 -0400 >> # Node ID

Re: [PATCH 4 of 4 py3] config: mark parser regexes as bytes explicitly

2016-11-09 Thread Martijn Pieters
d > ___________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Re: [PATCH] hgweb: fix the MRO in Python 3

2016-10-21 Thread Martijn Pieters
On 21 Oct 2016, at 14:08, timeless wrote: > Is there a checkcode test for this? No, but tests simply fail when you make this mistake. In this *specific case* that was only visible in the Python 3 tests because the base classes used in Python 2 were old-style classes, so in

Re: [PATCH 2 of 2 V3] py3: use namedtuple._replace to produce new tokens

2016-10-16 Thread Martijn Pieters
On 16 Oct 2016, at 15:30, Pierre-Yves David wrote: > >> py3: use namedtuple._replace to produce new tokens > > We seems to be using a private function of some stdlib type? > Can you elaborate on why this is a good move? It is not private. This is one of the

Re: [PATCH 1 of 2 V3] py3: refactor token parsing to handle call args properly

2016-10-15 Thread Martijn Pieters
On 15 Oct 2016, at 08:39, Yuya Nishihara <y...@tcha.org> wrote: > > On Fri, 14 Oct 2016 17:55:25 +0100, Martijn Pieters wrote: >> # HG changeset patch >> # User Martijn Pieters <mjpiet...@fb.com> >> # Date 1476464102 -3600 >> # F

Re: [PATCH 1 of 2 V2] py3: refactor token parsing to handle call args properly

2016-10-14 Thread Martijn Pieters
> This loop would never stop if malformed tokens were provided. I guess you > had a working version in which _isop() could raise IndexError. Nice catch! I'll turn the `while True` into a `for j in xrange(i + 2, len(tokens)):` loop instead, and avoid IndexError or looping to infinity altogether.

[PATCH 2 of 2 V3] py3: use namedtuple._replace to produce new tokens

2016-10-14 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1476347257 -3600 # Thu Oct 13 09:27:37 2016 +0100 # Node ID d20dd7db86044bdca79825499b913840d726d841 # Parent 9031460519503abe5dc430c8ece29d198121cd65 py3: use namedtuple._replace to produce new tokens diff

[PATCH 1 of 2 V3] py3: refactor token parsing to handle call args properly

2016-10-14 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1476464102 -3600 # Fri Oct 14 17:55:02 2016 +0100 # Node ID 9031460519503abe5dc430c8ece29d198121cd65 # Parent 733fb9f7bc92c694ba6bededaeb93206528c0bcd py3: refactor token parsing to handle call args properly The

[PATCH 1 of 2 V2] py3: refactor token parsing to handle call args properly

2016-10-13 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1476350485 -3600 # Thu Oct 13 10:21:25 2016 +0100 # Node ID 36607cf1bbd9fd4d99b607f927bc807fcc48d0ea # Parent 733fb9f7bc92c694ba6bededaeb93206528c0bcd py3: refactor token parsing to handle call args properly The

Re: [PATCH] py3: refactor token parsing to handle call args properly

2016-10-13 Thread Martijn Pieters
> Nice refactor. While I haven't looked at the code in detail yet, does > check-code not complain about the use of underscore_function_names? Apparently not! I did run the whole test suite, and ran it again just now. Nested function names are locals and exempt from the rule it appears. Should

[PATCH] py3: use namedtuple._replace to produce new tokens

2016-10-13 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1476347257 -3600 # Thu Oct 13 09:27:37 2016 +0100 # Node ID 22a15130f57927a79227ebfe763be082e2992f04 # Parent 81d23b9e2b329666db6e342f6bafec54a893687c py3: use namedtuple._replace to produce new tokens diff

[PATCH] py3: refactor token parsing to handle call args properly

2016-10-13 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1476346188 -3600 # Thu Oct 13 09:09:48 2016 +0100 # Node ID 81d23b9e2b329666db6e342f6bafec54a893687c # Parent 733fb9f7bc92c694ba6bededaeb93206528c0bcd py3: refactor token parsing to handle call args properly The

Re: [PATCH V2] py3: a second argument to open can't be bytes

2016-10-12 Thread Martijn Pieters
On 12 Oct 2016, at 14:00, Yuya Nishihara wrote: > FWIW, the current transformer will also rewrite open(f('foo')). This then also applies to getattr(f('foo'), ...). We'll need to assert that the 3rd token is a comma, I think. signature.asc Description: Message signed with

Re: [PATCH V2] py3: a second argument to open can't be bytes

2016-10-11 Thread Martijn Pieters
ument is not converted to a `bytes` object instead. You can compare this to the "if fn in ('getattr', 'setattr', 'hasattr', 'safehasattr'):" block above this change. -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-s

Re: [PATCH 08 of 11 py3] ui: explicitly open config files in binary mode

2016-10-11 Thread Martijn Pieters
On 10 October 2016 at 21:47, Yuya Nishihara <y...@tcha.org> wrote: > Do we still need this after 1f01e3e6 "py3: a second argument to open > can't be bytes" ? > I don't think so, no, but I haven't explicitly tested this l

[PATCH] pycompat: only accept a bytestring filepath in Python 2

2016-10-10 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1476137475 -3600 # Mon Oct 10 23:11:15 2016 +0100 # Node ID d74c594b68768d14d9414b0ebe062d1b0bdd542a # Parent 8d079c0594b35dfbf57baf8d83fde686a946920a pycompat: only accept a bytestring filepath in Python 2 diff

Re: [PATCH] py3: add an os.fsencode backport to ease path handling

2016-10-10 Thread Martijn Pieters
only needed in 3 really. -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

[PATCH] py3: add an os.fsencode backport to ease path handling

2016-10-09 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1476027863 -7200 # Sun Oct 09 17:44:23 2016 +0200 # Node ID 1fef9008cbd2098f058f1458df4d59552da88c16 # Parent 82489cd912f332be976cf432673ad47af0d04cd7 py3: add an os.fsencode backport to ease path handling diff

Re: [PATCH 11 of 11 py3] extensions: fix extension module hunting on Python 3

2016-10-09 Thread Martijn Pieters
_ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Re: [PATCH 11 of 11 py3] extensions: fix extension module hunting on Python 3

2016-10-09 Thread Martijn Pieters
try: > mod = _importh("hgext.%s" % name) > ___________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Re: [PATCH] py3: test to check which commands run

2016-10-09 Thread Martijn Pieters
+ value = self._data[self.encodekey(key)] > +File "/usr/lib/python3.5/os.py", line 754, in encode > + raise TypeError("str expected, not %s" % type(value).__name__) > + TypeError: str expected, not bytes > + [1] > ___ > Mercurial-devel mailing list &g

[PATCH] py3: a second argument to open can't be bytes

2016-10-09 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1476012788 -7200 # Sun Oct 09 13:33:08 2016 +0200 # Node ID 096d7a42fe6425bf741b09d47e77b387c6180ca4 # Parent a56076f85aa6aa728457ecc571ff58514bc59896 py3: a second argument to open can't be bytes diff --git a/mer

Re: [PATCH] py3: use encoding.environ instead of os.environ

2016-10-09 Thread Martijn Pieters
al-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

[PATCH] hgweb: fix the MRO in Python 3

2016-10-08 Thread Martijn Pieters
# HG changeset patch # User Martijn Pieters <mjpiet...@fb.com> # Date 1475946679 -7200 # Sat Oct 08 19:11:19 2016 +0200 # Node ID 8475a954a40385035b57abe05af31308597a0b3c # Parent 2c8ec8c2ddfeb2d229b81eb5b11e3639fb34b0a0 hgweb: fix the MRO in Python 3 object should appear at t

Re: [PATCH] py3: revset - change iteritems to items

2016-10-08 Thread Martijn Pieters
arobj._table.items(): > symbols[name] = func > if func._safe: > safesymbols.add(name) > ___ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Re: [PATCH 1 of 2] py3: make the string unicode so its iterable in py3k

2016-10-08 Thread Martijn Pieters
, 256): > > ___ > > Mercurial-devel mailing list > > Mercurial-devel@mercurial-scm.org > > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > ___ > Mercurial-devel

Re: [PATCH 2 of 2] py3: make encodefun in store.py compatible with py3k

2016-10-08 Thread Martijn Pieters
error at patch.py:*) >mercurial/templatekw.py: error importing: module > 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) > ___ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > -- Martijn Pieters ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

  1   2   >