D4500: util: ability to change capacity when copying lrucachedict

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will allow us to easily replace an lrucachedict with one with a higher or lower capacity as consumers deem necessary. IMO it is easier to

D4502: util: allow lrucachedict to track cost of entries

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Currently, lrucachedict allows tracking of arbitrary items with the only limit being the total number of items in the cache. Caches can be a lot more useful

D4503: util: teach lrucachedict to enforce a max total cost

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that lrucachedict entries can have a numeric cost associated with them and we can easily pop the oldest item in the cache, it now becomes relatively

D4477: merge: move purge logic from extension

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10825. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4477?vs=10775=10825 REVISION DETAIL https://phab.mercurial-scm.org/D4477 AFFECTED FILES hgext/purge.py mercurial/merge.py CHANGE DETAILS diff --git

D4478: merge: use vfs methods for I/O

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10826. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4478?vs=10776=10826 REVISION DETAIL https://phab.mercurial-scm.org/D4478 AFFECTED FILES mercurial/merge.py mercurial/vfs.py CHANGE DETAILS diff --git

D4497: tests: rewrite test-lrucachedict.py to use unittest

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This makes the code so much easier to test and debug. Along the way, I discovered a bug in copy(), which I kind of added test coverage for. REPOSITORY

D4499: util: make capacity a public attribute on lrucachedict

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY So others can query it. Useful for operations that may want to verify the cache has capacity for N items before it performs an operation that may cause cache

D4504: util: optimize cost auditing on insert

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Calling popoldest() on insert with cost auditing enabled introduces significant overhead. The primary reason for this overhead is that popoldest() needs to

D4501: util: add a popoldest() method to lrucachedict

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This allows consumers to prune the oldest item from the cache. This could be useful for e.g. a consumer that wishes for the size of items tracked by the cache

D4505: util: lower water mark when removing nodes after cost limit reached

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY See the inline comment for the reasoning here. This is a pretty common strategy for garbage collectors, other cache-like primtives. The performance impact

D4506: util: update lrucachedict order during get()

2018-09-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY get() should have the same semantics as __getitem__ for item retrieval. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4506

D4498: util: properly copy lrucachedict instances

2018-09-07 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > martinvonz wrote in util.py:1302 > Btw, why doesn't this do `return self[k]` instead? It seems surprising that > the recency is not updated. Yes, this does feel like a bug. But it feels unrelated to the series, no? I can certainly code up a

D4498: util: properly copy lrucachedict instances

2018-09-07 Thread indygreg (Gregory Szorc)
indygreg added a comment. Added https://phab.mercurial-scm.org/D4506 to the series to fix the bug with `get()`. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4498 To: indygreg, #hg-reviewers Cc: martinvonz, mercurial-devel

D4440: wireprotov2peer: report exceptions in frame handling against request future

2018-09-10 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG42bc1c70a6b8: wireprotov2peer: report exceptions in frame handling against request future (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4441: wireprotov2peer: properly format errors

2018-09-10 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG43d92d68ac88: wireprotov2peer: properly format errors (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4441?vs=10790=10858

D4397: stringutil: refactor core of pprint so it emits chunks

2018-08-29 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0d21b1f1722c: stringutil: refactor core of pprint so it emits chunks (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4398: stringutil: emit multiple chunks when pretty printing

2018-08-29 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG5ed7c6caf24d: stringutil: emit multiple chunks when pretty printing (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4399: stringutil: teach pprint() to indent

2018-08-30 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0f549da54379: stringutil: teach pprint() to indent (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4399?vs=10600=10681

D4502: util: allow lrucachedict to track cost of entries

2018-09-07 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10832. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4502?vs=10821=10832 REVISION DETAIL https://phab.mercurial-scm.org/D4502 AFFECTED FILES contrib/perf.py mercurial/util.py tests/test-lrucachedict.py

D4502: util: allow lrucachedict to track cost of entries

2018-09-07 Thread indygreg (Gregory Szorc)
indygreg planned changes to this revision. indygreg added inline comments. INLINE COMMENTS > lothiraldan wrote in util.py:1277 > I'm not sure this line is tested, I didnd't see a test where we replace an > entry with an associated cost Good catch! I'll send a revised patch. FWIW, cost

D4477: merge: move purge logic from extension

2018-09-07 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG7fea205fd5dc: merge: move purge logic from extension (authored by indygreg, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D4477?vs=10825=10827#toc REPOSITORY rHG Mercurial

D4478: merge: use vfs methods for I/O

2018-09-07 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3dd34b401bc2: merge: use vfs methods for I/O (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4478?vs=10826=10828 REVISION

D4465: httppeer: use our CBOR decoder

2018-09-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGcdb56f295b03: httppeer: use our CBOR decoder (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4465?vs=10762=10782 REVISION

D4467: wireprotoserver: use our CBOR encoder

2018-09-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG5f4a9ada5ab5: wireprotoserver: use our CBOR encoder (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4467?vs=10764=10784

D4466: wireprotoframing: use our CBOR module

2018-09-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG36f487a332ad: wireprotoframing: use our CBOR module (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4466?vs=10763=10783

D4470: wireprotov2peer: use our CBOR decoder

2018-09-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9f51fd22ed50: wireprotov2peer: use our CBOR decoder (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4470?vs=10767=10787

D4471: state: use our CBOR module

2018-09-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG5bfab9400daf: state: use our CBOR module (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4471?vs=10768=10788 REVISION

D4468: wireprotov2server: use our CBOR encoder

2018-09-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG660879e49b46: wireprotov2server: use our CBOR encoder (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4468?vs=10765=10785

D4469: debugcommands: use our CBOR decoder

2018-09-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGe5eb67dea6e8: debugcommands: use our CBOR decoder (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4469?vs=10766=10786

D3882: manifest: define and implement rev() on manifestlog

2018-07-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGf2f9bacf0587: manifest: define and implement rev() on manifestlog (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D3883: manifest: define and implement addgroup() on manifestlog

2018-07-05 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0db41eb0a3ac: manifest: define and implement addgroup() on manifestlog (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D3932: tests: add test demonstrating phase loss when cloning (issue5939)

2018-07-11 Thread indygreg (Gregory Szorc)
indygreg added a subscriber: lothiraldan. indygreg added a comment. I don't understand phases code that well and am not sure if I'll be able to contribute a fix for the underlying issue in the next few days. If someone wants to take a shot at it, I could use the help. CC @lothiraldan

D3932: tests: add test demonstrating phase loss when cloning (issue5939)

2018-07-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The added tests demonstrate that phases exchange when using the listkeys based phases exchange fails to preserve public phase in a certain scenario when a

D3869: repository: define manifest interfaces

2018-07-03 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc82ea938efbb: repository: define manifest interfaces (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3869?vs=9383=9415

D3845: worker: support more return types in posix worker

2018-07-04 Thread indygreg (Gregory Szorc)
indygreg added a comment. In https://phab.mercurial-scm.org/D3845#60316, @durin42 wrote: > It's been recommended to me that we avoid the streaming flavor of > cbor, so we'd probably just do one-shot messages. Out of curiosity, could you elaborate? One of the critiques

D3882: manifest: define and implement rev() on manifestlog

2018-07-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Various code is accessing repo.manifestlog._revlog - a private attribute. This bypasses our interface and makes it difficult to implement non-revlog manifest

D3884: tests: use interfaceutil in simplestorerepo

2018-07-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Without it, we crash at module import time. This has likely been busted since https://phab.mercurial-scm.org/rHG856f381ad74b78f5188a8e12648e9f7d38097c46.

D3884: tests: use interfaceutil in simplestorerepo

2018-07-04 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG404eab7ff33f: tests: use interfaceutil in simplestorerepo (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3884?vs=9435=9437

D3943: scmutil: rewrite docstring for filecache

2018-07-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The old docstring was incorrect in that it said that subsequent calls perform a stat() and refresh the object if things change. This is not how things work:

D1931: bundle2: always advertise client support for stream parts

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg added a comment. In https://phab.mercurial-scm.org/D1931#32542, @lothiraldan wrote: > This patch seems to contain two changes: > > - Introduce new common patterns `$USUAL_BUNDLE_CAPS_SERVER$` and `$USUAL_BUNDLE2_CAPS_SERVER$` with all the changes in the tests. > - Make the

D1931: bundle2: always advertise client support for stream parts

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 4989. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1931?vs=4972=4989 REVISION DETAIL https://phab.mercurial-scm.org/D1931 AFFECTED FILES mercurial/bundle2.py tests/common-pattern.py tests/test-acl.t

D1932: bundle2: increase payload part chunk size to 32kb

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 4990. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1932?vs=4973=4990 REVISION DETAIL https://phab.mercurial-scm.org/D1932 AFFECTED FILES mercurial/bundle2.py tests/test-clone-uncompressed.t CHANGE DETAILS

D1935: tests: update test to work with Git 2.16

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It looks like Git 2.16 removed the "..." from some strings. Glob over those characters in the test output. REPOSITORY rHG Mercurial REVISION DETAIL

D1927: bundle2: move version of stream clone into part name

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 4985. indygreg edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1927?vs=4968=4985 REVISION DETAIL https://phab.mercurial-scm.org/D1927 AFFECTED FILES mercurial/bundle2.py

D1926: exchange: send bundle2 stream clones uncompressed

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 4984. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1926?vs=4967=4984 REVISION DETAIL https://phab.mercurial-scm.org/D1926 AFFECTED FILES mercurial/bundle2.py mercurial/exchange.py mercurial/wireproto.py

D1930: exchange: don't send stream data when server.uncompressed is set

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 4988. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1930?vs=4971=4988 REVISION DETAIL https://phab.mercurial-scm.org/D1930 AFFECTED FILES mercurial/exchange.py tests/test-clone-uncompressed.t CHANGE DETAILS

D1929: bundle2: don't advertise stream bundle2 capability when feature disabled

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 4987. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1929?vs=4970=4987 REVISION DETAIL https://phab.mercurial-scm.org/D1929 AFFECTED FILES mercurial/bundle2.py tests/test-clone-uncompressed.t CHANGE DETAILS

D1928: tests: add more testing around server.uncompressed

2018-01-22 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 4986. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1928?vs=4969=4986 REVISION DETAIL https://phab.mercurial-scm.org/D1928 AFFECTED FILES tests/test-clone-uncompressed.t CHANGE DETAILS diff --git

D1930: exchange: don't send stream data when server.uncompressed is set

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9adae6a20e1f: exchange: dont send stream data when server.uncompressed is set (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D1926: exchange: send bundle2 stream clones uncompressed

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa84dbc87dae9: exchange: send bundle2 stream clones uncompressed (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D1929: bundle2: don't advertise stream bundle2 capability when feature disabled

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc1b9eb15a51c: bundle2: dont advertise stream bundle2 capability when feature disabled (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D1928: tests: add more testing around server.uncompressed

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8ed5f7609728: tests: add more testing around server.uncompressed (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D1932: bundle2: increase payload part chunk size to 32kb

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG4fb2bb61597c: bundle2: increase payload part chunk size to 32kb (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D1935: tests: update test to work with Git 2.16

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8144f1b07e21: tests: update test to work with Git 2.16 (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1935?vs=4991=4992

D1927: bundle2: move version of stream clone into part name

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGb116a66bcc44: bundle2: move version of stream clone into part name (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D1931: bundle2: always advertise client support for stream parts

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG1d118f9f4f57: bundle2: always advertise client support for stream parts (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D1934: convert: use a collections.deque

2018-01-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGeefabd9ed3e1: convert: use a collections.deque (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1934?vs=4975=4976 REVISION

D4541: hg: write narrow patterns after repo creation

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that hg.clone() knows when a narrow clone is requested, it makes sense to have it update the narrow patterns for the repo

D4538: commands: pass include and exclude options to hg.clone()

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These arguments are defined by the narrow extension. Let's teach core to recognize them so we can delete some code from the

D4530: narrow: drop support for remote expansion (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previous patches to validate narrow patterns accidentically dropped support for the include: syntax that allows patterns to be

D4524: narrowspec: validate patterns when loading and saving spec file

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10901. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4524?vs=10897=10901 REVISION DETAIL https://phab.mercurial-scm.org/D4524 AFFECTED FILES mercurial/narrowspec.py tests/test-narrow-patterns.t CHANGE

D4537: localrepo: add requirement when narrow files creation option present

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The previous commit taught hg.clone() to define a creation option when file include or exclude patterns are passed. This commit teaches the new repo

D4522: narrowspec: limit patterns to path: and rootfilesin: (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > martinvonz wrote in narrowspec.py:114-130 > Obsolete copy of what you inlined into parsepatterns? It is a copy, but not obsolete. `parsepatterns()` normalizes patterns supplied by the user or an untrusted source. `validatepatterns` is used on

D4526: narrow: validate spec files are well-formed during clone (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > martinvonz wrote in test-narrow-clone-no-ellipsis.t:133 > Maybe "file:" was just a typo for "path:" so it's better to replace it by > "path:" (instead of having both)? I was wondering about that too. I agree it feels wrong. I didn't feel like

D4542: fastannotate: use repo.local()

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is the proper way to check whether we're dealing with a local repository, since extensions should be coding to an interface and not testing for exact

D4529: narrow: mark wire proto capability names experimental and versioned

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. Unfortunately we likely can never ship either the `narrow` or `ellipsis` capability as stable because it would confuse 4.7 clients, which will presumably have a different understanding

D4522: narrowspec: limit patterns to path: and rootfilesin: (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10896. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4522?vs=10885=10896 REVISION DETAIL https://phab.mercurial-scm.org/D4522 AFFECTED FILES mercurial/narrowspec.py tests/test-narrow-clone.t

D4523: narrow: validate patterns returned by expandnarrow

2018-09-11 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG55eea29833d2: narrow: validate patterns returned by expandnarrow (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4526: narrow: validate spec files are well-formed during clone (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10902. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4526?vs=10898=10902 REVISION DETAIL https://phab.mercurial-scm.org/D4526 AFFECTED FILES hgext/narrow/narrowcommands.py

D4532: narrow: set opts['narrow'] instead of local variable

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will allow the command function in core to infer the presence of the option without duplicating logic. REPOSITORY rHG

D4535: hg: allow extra arguments to be passed to repo creation

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Currently, repository creation is influenced by consulting the ui instance and turning config options into requirements. This means that in order to influence

D4540: narrow: don't wrap exchange.pull() during clone

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The wrapped version was setting up the narrow repo requirement when a narrow clone was requested. Previous commits taught

D4539: exchange: support defining narrow file patterns for pull

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This commit teaches exchange.pull() about the desire to perform a narrow file pull. We simply pass include and exclude patterns to the function. The values are

D4529: narrow: mark wire proto capability names experimental and versioned

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg added a comment. In https://phab.mercurial-scm.org/D4529#69189, @martinvonz wrote: > In https://phab.mercurial-scm.org/D4529#69177, @indygreg wrote: > > > Unfortunately we likely can never ship either the `narrow` or `ellipsis` capability as stable because it would confuse

D4526: narrow: validate spec files are well-formed during clone (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8301741e1f89: narrow: validate spec files are well-formed during clone (BC) (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4533: localrepo: pass ui to newreporequirements()

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY newreporequirements() is called as part of creating a new repository. It doesn't make much sense for it to receive a repo instance as part of determining what

D4534: localrepo: move repo creation logic out of localrepository.__init__

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It has long bothered me that local repository creation is handled as part of localrepository.__init__. Upcoming changes I want to make around how repositories

D4526: narrow: validate spec files are well-formed during clone (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10898. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4526?vs=10889=10898 REVISION DETAIL https://phab.mercurial-scm.org/D4526 AFFECTED FILES hgext/narrow/narrowcommands.py

D4524: narrowspec: validate patterns when loading and saving spec file

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10897. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4524?vs=10887=10897 REVISION DETAIL https://phab.mercurial-scm.org/D4524 AFFECTED FILES mercurial/narrowspec.py tests/test-narrow-patterns.t CHANGE

D4524: narrowspec: validate patterns when loading and saving spec file

2018-09-11 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8d8e61df8259: narrowspec: validate patterns when loading and saving spec file (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4536: hg: recognize include and exclude patterns when cloning

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This commit teaches clone() to accept arguments defining file patterns to clone. This is the first step in teaching core code about the existence of a narrow

D4522: narrowspec: limit patterns to path: and rootfilesin: (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
indygreg added a subscriber: martinvonz. indygreg added a comment. Looking through this code a bit more, it appears that there is a not-in-core "remote expansion" wire protocol command that recognizes the `include:` prefix and asks the server to expand it. This series will stop that from

D4522: narrowspec: limit patterns to path: and rootfilesin: (BC)

2018-09-11 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0d572769046a: narrowspec: limit patterns to path: and rootfilesin: (BC) (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4525: narrow: validate patterns on incoming bundle2 part

2018-09-11 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGce20caecacbd: narrow: validate patterns on incoming bundle2 part (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D2069: revlog: resolve lfs rawtext to vanilla rawtext before applying delta

2018-03-06 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. This change is a bit difficult to reason about. But I think it is fine. Essentially, we're ensuring that the delta stored in the revlog is applied on top of the fulltext after flag

D2067: changegroup: do not delta lfs revisions

2018-03-06 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added inline comments. INLINE COMMENTS > test-lfs.t:374 > * (manifests) (glob) > - * a (glob) > + * a (glob) >$ hg --config extensions.strip= strip -r 2 --no-backup --force -q Where did this change come from? REPOSITORY rHG

D2068: revlog: do not use delta for lfs revisions

2018-03-06 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added inline comments. This revision is now accepted and ready to land. INLINE COMMENTS > test-revlog-raw.py:156-161 > +if r == 0 or rlog.flags(r): > text = rlog.revision(r, raw=True) > cachedelta = None > else:

D2013: commit: allow --no-secret to override phases.new-commit setting

2018-03-06 Thread indygreg (Gregory Szorc)
indygreg added a comment. @spectral: what's the state of this series? Do you plan to submit a follow-up? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2013 To: spectral, #hg-reviewers Cc: indygreg, martinvonz, mercurial-devel

D2096: infinitepush: move the extension to core from fb-hgext

2018-03-06 Thread indygreg (Gregory Szorc)
indygreg requested changes to this revision. indygreg added a comment. This revision now requires changes to proceed. Per discussion at sprint, Pulkit will follow up by deleting yet more code around workspaces and scratch branches. We're going to focus on the "try server" use case for the

D2718: wireproto: declare permissions requirements in @wireprotocommand (API)

2018-03-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY With the security patches from 4.5.2 merged into default, we now have a per-command attribute defining what permissions are needed to run that command. We now

D2719: wireproto: formalize permissions checking as part of protocol interface

2018-03-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Per the inline comment desiring to formalize permissions checking in the protocol interface, we do that. I'm not convinced this is the best way to go about

D2720: debugcommands: introduce actions to perform deterministic reads

2018-03-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY "readavailable" is useful as a debugging device to see what data is available on a pipe. But the mechanism isn't deterministic because what's available on a

D2717: wireprotoserver: check permissions in main dispatch function

2018-03-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The permissions checking code merged from stable is out of place in the refactored hgweb_mod module. This commit moves the main call to wireprotoserver. We

D2716: wireprotoserver: check if command available before calling it

2018-03-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The previous behavior was just plain wrong. I have no clue how it landed. My guess is a merge conflict resolution gone wrong on my end a few weeks ago.

D2686: xdiff: add a preprocessing step that trims files

2018-03-06 Thread indygreg (Gregory Szorc)
indygreg added a comment. @quark: Will you be refactoring this based on upstream feedback? Or rebasing due to other xdiff changes that have since landed? i.e. should I review this patch now? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2686 To: quark,

D2706: xdiff: remove xmerge related logic

2018-03-06 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. Good riddance to hard-to-read C code. Thank you for doing this. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2706 To: quark, #hg-reviewers,

D2683: xdiff: remove whitespace related feature

2018-03-06 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. I *love* patches that only remove code. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2683 To: quark, #hg-reviewers, indygreg Cc: indygreg,

D2725: httppeer: refactor how httppeer is created (API)

2018-03-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, we passed a bunch of arguments to httppeer.__init__, validated them, then possibly constructed a valid instance. A short while ago, we

D2721: util: observable proxy objects for sockets

2018-03-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We previously introduced proxy objects and observers for file objects to help implement low-level tests for the SSH wire protocol. In this commit, we do the

D2723: httppeer: remove _requestbuilder attribute

2018-03-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This was a glorified alias to a function in another module. I have no clue why it existed. REPOSITORY rHG Mercurial REVISION DETAIL

<    9   10   11   12   13   14   15   16   17   18   >