[PATCH 2 of 2] remotefilelog: prevent this extension from loading on Windows

2018-11-27 Thread Matt Harbison
# HG changeset patch # User Matt Harbison # Date 1543376352 18000 # Tue Nov 27 22:39:12 2018 -0500 # Node ID aac9ae9f512f53a907dc799d2d6050931001e6e1 # Parent c743bb1c19513a61925ce4663d33323aea7016cc remotefilelog: prevent this extension from loading on Windows See 0800d9e6e216. This

[PATCH 1 of 2] tests: also skip remotefilelog *.py tests on Windows

2018-11-27 Thread Matt Harbison
# HG changeset patch # User Matt Harbison # Date 1543375392 18000 # Tue Nov 27 22:23:12 2018 -0500 # Node ID c743bb1c19513a61925ce4663d33323aea7016cc # Parent df8ed31a8ad8ae116e31550d9128055ece22e258 tests: also skip remotefilelog *.py tests on Windows This should have gone with

Re: Auto-formatting code with black - object now if you have a strong opinion

2018-11-27 Thread Gregory Szorc
On Tue, Nov 27, 2018 at 8:13 AM Augie Fackler wrote: > > > > On Nov 27, 2018, at 11:09, Pulkit Goyal <7895pul...@gmail.com> wrote: > > > > I am +1 on using black. > > > > Adding to what Augie said, we plan to preserve the annotate history by > commiting the changes with something like "#

D5064: style: run black on a subset of mercurial

2018-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 added a comment. In https://phab.mercurial-scm.org/D5064#78990, @durin42 wrote: > Does anyone strongly object, or do we want to embrace black and the formatting changes it implies? Is there a fix extension configuration (and I guess precommit hook- I've never used

Re: Auto-formatting code with black - object now if you have a strong opinion

2018-11-27 Thread Pulkit Goyal
On Tue, Nov 27, 2018 at 7:10 PM Augie Fackler wrote: > > > > On Nov 27, 2018, at 11:09, Pulkit Goyal <7895pul...@gmail.com> wrote: > > > > I am +1 on using black. > > > > Adding to what Augie said, we plan to preserve the annotate history by > commiting the changes with something like "#

D5269: tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t

2018-11-27 Thread durin42 (Augie Fackler)
durin42 added a comment. Updated. Note that this and its child should go on *stable*, since otherwise the test is broken on FreeBSD 11.2 there. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5269 To: durin42, #hg-reviewers Cc: yuja, mercurial-devel

D5269: tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t

2018-11-27 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 12612. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5269?vs=12536=12612 REVISION DETAIL https://phab.mercurial-scm.org/D5269 AFFECTED FILES tests/test-fuzz-targets.t CHANGE DETAILS diff --git

D5270: tests: sniff for libfuzzer actually being available in test-fuzz-targets.t

2018-11-27 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 12613. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5270?vs=12537=12613 REVISION DETAIL https://phab.mercurial-scm.org/D5270 AFFECTED FILES tests/test-fuzz-targets.t CHANGE DETAILS diff --git

Re: Auto-formatting code with black - object now if you have a strong opinion

2018-11-27 Thread Augie Fackler
> On Nov 27, 2018, at 11:09, Pulkit Goyal <7895pul...@gmail.com> wrote: > > I am +1 on using black. > > Adding to what Augie said, we plan to preserve the annotate history by > commiting the changes with something like "# skip-blame" in commit message. > We can then skip those revisions

Re: Auto-formatting code with black - object now if you have a strong opinion

2018-11-27 Thread Pulkit Goyal
I am +1 on using black. Adding to what Augie said, we plan to preserve the annotate history by commiting the changes with something like "# skip-blame" in commit message. We can then skip those revisions while annotating using the `--skip` flag of `hg annotate` which accepts a revset, something

Auto-formatting code with black - object now if you have a strong opinion

2018-11-27 Thread Augie Fackler
In https://phab.mercurial-scm.org/D5064 we're talking about using the `black` formatter from Ɓukasz Langa on hg. This will imply a few style changes to our codebase, notably: * We'll use " everywhere instead of ' * Import formatting will change a bit * We'll have two blank lines between

D5064: style: run black on a subset of mercurial

2018-11-27 Thread durin42 (Augie Fackler)
durin42 added a comment. In https://phab.mercurial-scm.org/D5064#78780, @mjpieters wrote: > 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

[Bug 6026] New: umask unsoundness on creating .hg/cache/checklink?

2018-11-27 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6026 Bug ID: 6026 Summary: umask unsoundness on creating .hg/cache/checklink? Product: Mercurial Version: stable branch Hardware: All OS: Mac OS Status: UNCONFIRMED

[Bug 6025] New: `hg diff --git --stat` does not work correctly on renames

2018-11-27 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6025 Bug ID: 6025 Summary: `hg diff --git --stat` does not work correctly on renames Product: Mercurial Version: default branch Hardware: PC OS: Linux

Re: D5308: store: don't pass 'atomictemp=True' while appending to fncache

2018-11-27 Thread Yuya Nishihara
On Tue, 27 Nov 2018 13:53:07 +, pulkit (Pulkit Goyal) wrote: > do we need to call `addbackup()` if we are just appending? We need a mechanism to restore the original content on rollback. IIUC, it's `tr.add()` for append-only files. As I said, we'll also need to somehow hide partial data

D5308: store: don't pass 'atomictemp=True' while appending to fncache

2018-11-27 Thread pulkit (Pulkit Goyal)
pulkit added a comment. In https://phab.mercurial-scm.org/D5308#78985, @yuja wrote: > > - a/mercurial/store.py +++ b/mercurial/store.py @@ -486,7 +486,7 @@ if self.addls: > > 1. if we have just new entries, let's append them to the fncache tr.addbackup('fncache') > > - fp =

D5307: store: write fncache only once if there are both adds and removes

2018-11-27 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGdf8ed31a8ad8: store: write fncache only once if there are both adds and removes (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D5308: store: don't pass 'atomictemp=True' while appending to fncache

2018-11-27 Thread yuja (Yuya Nishihara)
yuja added a comment. > - a/mercurial/store.py +++ b/mercurial/store.py @@ -486,7 +486,7 @@ if self.addls: > 1. if we have just new entries, let's append them to the fncache tr.addbackup('fncache') > - fp = self.vfs('fncache', mode='ab', atomictemp=True) +fp =

Re: D5308: store: don't pass 'atomictemp=True' while appending to fncache

2018-11-27 Thread Yuya Nishihara
> --- a/mercurial/store.py > +++ b/mercurial/store.py > @@ -486,7 +486,7 @@ > if self.addls: > # if we have just new entries, let's append them to the fncache > tr.addbackup('fncache') > -fp = self.vfs('fncache', mode='ab', atomictemp=True) > +

D5308: store: don't pass 'atomictemp=True' while appending to fncache

2018-11-27 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Appending to an atomictemp file means that the entire file is copied first. Thanks to Yuya for suggesting. REPOSITORY rHG Mercurial REVISION DETAIL

D5307: store: write fncache only once if there are both adds and removes

2018-11-27 Thread pulkit (Pulkit Goyal)
pulkit 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/D5307 AFFECTED FILES mercurial/store.py CHANGE DETAILS diff --git a/mercurial/store.py

[PATCH 7 of 7] blackbox: initialize logger with repo instance

2018-11-27 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1541934338 -32400 # Sun Nov 11 20:05:38 2018 +0900 # Node ID 2d10adb04855ae36aa059e072403b124a4416ffc # Parent 47d8e701444c98d355794b1a398e25840557a2b1 blackbox: initialize logger with repo instance The blackboxlogger is unusable without a

[PATCH 6 of 7] blackbox: do not nullify repo to deactivate the logger on failure

2018-11-27 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1542455785 -32400 # Sat Nov 17 20:56:25 2018 +0900 # Node ID 47d8e701444c98d355794b1a398e25840557a2b1 # Parent abd5a060c6c9dfd455ecec7ff8a4f6a831ea8060 blackbox: do not nullify repo to deactivate the logger on failure The _repo will be a

[PATCH 5 of 7] blackbox: extract global last logger to proxylogger class

2018-11-27 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1541934154 -32400 # Sun Nov 11 20:02:34 2018 +0900 # Node ID abd5a060c6c9dfd455ecec7ff8a4f6a831ea8060 # Parent 8c6e8c636c57e8adc99ba02eb97812fc61c151cc blackbox: extract global last logger to proxylogger class So the blackboxlogger can be

[PATCH 4 of 7] ui: pass in bytes opts dict to logger.log()

2018-11-27 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1541932581 -32400 # Sun Nov 11 19:36:21 2018 +0900 # Node ID 8c6e8c636c57e8adc99ba02eb97812fc61c151cc # Parent f504187cc42508837296ba92c2261d6879fcacf1 ui: pass in bytes opts dict to logger.log() This is the convention of the Mercurial API.

[PATCH 3 of 7] ui: pass in formatted message to logger.log()

2018-11-27 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1541932533 -32400 # Sun Nov 11 19:35:33 2018 +0900 # Node ID f504187cc42508837296ba92c2261d6879fcacf1 # Parent 29e1cd661c3c67c2099af4dd21631bee0df172ed ui: pass in formatted message to logger.log() This makes sure that all logger instances

[PATCH 2 of 7] blackbox: send debug message to logger by core ui

2018-11-27 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1541925286 -32400 # Sun Nov 11 17:34:46 2018 +0900 # Node ID 29e1cd661c3c67c2099af4dd21631bee0df172ed # Parent ee25cad69149d026527056398ec6df3f9122e5a6 blackbox: send debug message to logger by core ui Since the core ui.log() may recurse

[PATCH 1 of 7] blackbox: change the way of deactivating the logger on write error

2018-11-27 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1542453830 -32400 # Sat Nov 17 20:23:50 2018 +0900 # Node ID ee25cad69149d026527056398ec6df3f9122e5a6 # Parent 380a1f73830f0ac5925bf8a20c8c302df2176514 blackbox: change the way of deactivating the logger on write error This prepares for the

Re: D5296: store: don't read the whole fncache in memory

2018-11-27 Thread Yuya Nishihara
On Tue, 27 Nov 2018 10:48:44 +, pulkit (Pulkit Goyal) wrote: > Seeing the performance benefit it brings on our repo, I want to try other > ways we can do this. Do we like having a conditional which checks the size of > fncache and choose one of the approaches depending on how large it is?

D5301: store: append to fncache if there are only new files to write

2018-11-27 Thread yuja (Yuya Nishihara)
yuja added a comment. > @@ -479,32 +481,45 @@ > > fp.write(encodedir('\n'.join(self.entries) + '\n')) > fp.close() > self._dirty = False > > +if self.addls: > +# if we have just new entries, let's append them to the fncache > +

Re: D5301: store: append to fncache if there are only new files to write

2018-11-27 Thread Yuya Nishihara
> @@ -479,32 +481,45 @@ > fp.write(encodedir('\n'.join(self.entries) + '\n')) > fp.close() > self._dirty = False > +if self.addls: > +# if we have just new entries, let's append them to the fncache > +

Re: [PATCH 1 of 5 V3] perf: stop creating new revlog by hand in perftags

2018-11-27 Thread Yuya Nishihara
On Mon, 26 Nov 2018 19:26:06 +0100, Boris Feld wrote: > # HG changeset patch > # User Boris Feld > # Date 1543149473 -3600 > # Sun Nov 25 13:37:53 2018 +0100 > # Node ID a2a4aabea58bef816eeb53e80ddaf0d438717c66 > # Parent cfaf3843491bde30916b89180d5f67561a22da28 > # EXP-Topic perf-tags > #

Re: [PATCH 1 of 5 FOLLOW-UP] revlog: update the docstring of `ancestors` to match reality

2018-11-27 Thread Yuya Nishihara
On Mon, 26 Nov 2018 19:33:50 +0100, Boris Feld wrote: > # HG changeset patch > # User Boris Feld > # Date 1543187291 -3600 > # Mon Nov 26 00:08:11 2018 +0100 > # Node ID 87443a7ac7f6a37ed59d6429c87118c64b7287f6 > # Parent cfaf3843491bde30916b89180d5f67561a22da28 > # EXP-Topic follow-up-yuya

D4892: narrow: drop the bundle2 capability since we have server capabilities (BC)

2018-11-27 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 12608. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4892?vs=11711=12608 REVISION DETAIL https://phab.mercurial-scm.org/D4892 AFFECTED FILES hgext/narrow/narrowbundle2.py

D5296: store: don't read the whole fncache in memory

2018-11-27 Thread pulkit (Pulkit Goyal)
pulkit added a comment. Seeing the performance benefit it brings on our repo, I want to try other ways we can do this. Do we like having a conditional which checks the size of fncache and choose one of the approaches depending on how large it is? If size(fncache) < 50M, use the current

D5306: remotefilelog: fix typo in docstring

2018-11-27 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG32a23c3f56d4: remotefilelog: fix typo in docstring (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5306?vs=12600=12607

D5302: py3: use pycompat.xrange instead of xrange

2018-11-27 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 12606. pulkit retitled this revision from "py3: alias xrange to range" to "py3: use pycompat.xrange instead of xrange". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5302?vs=12596=12606 REVISION DETAIL

D5302: py3: alias xrange to range

2018-11-27 Thread pulkit (Pulkit Goyal)
pulkit added inline comments. INLINE COMMENTS > durin42 wrote in test-remotefilelog-histpack.py:29 > why not just use pycompat.xrange directly instead of doing extra indirection? Forgot that was a thing. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5302 To: