D2768: hgweb: use a capped reader for WSGI input stream

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG290fc4c3d1e0: hgweb: use a capped reader for WSGI input stream (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D2771: hgweb: expose input stream on parsed WSGI request object

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGda4e2f87167d: hgweb: expose input stream on parsed WSGI request object (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D2767: hgweb: document continuereader

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG7066617187c1: hgweb: document continuereader (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2767?vs=6811=6906 REVISION

D2770: hgweb: make parsedrequest part of wsgirequest

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG1f7d9024674c: hgweb: make parsedrequest part of wsgirequest (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D2774: hgweb: remove support for POST form data (BC)

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG01f6bba64424: hgweb: remove support for POST form data (BC) (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D2747: hgweb: remove unused methods on wsgirequest

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGe85574176467: hgweb: remove unused methods on wsgirequest (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2747?vs=6827=6902

D2746: wireprotoserver: remove unused argument from _handlehttperror()

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0bc771bba220: wireprotoserver: remove unused argument from _handlehttperror() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D2744: hgweb: handle CONTENT_LENGTH

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGed0456fde625: hgweb: handle CONTENT_LENGTH (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2744?vs=6824=6899 REVISION

D2743: wireprotoserver: access headers through parsed request

2018-03-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG14f70c44af6c: wireprotoserver: access headers through parsed request (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D2830: hgweb: remove dead wsgirequest code

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY All responses now go through our modern response type. All code related to response handling can be deleted. REPOSITORY rHG Mercurial REVISION DETAIL

D2827: hgweb: use modern response type for index generation

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg 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/D2827 AFFECTED FILES mercurial/hgweb/hgwebdir_mod.py CHANGE DETAILS diff --git

D2829: hgweb: port to new response API

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These were the last consumers of wsgirequest.respond() \o/ REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2829 AFFECTED FILES

D2814: hgweb: move rawentries() to a standalone function

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It was only accessing a few variables from the outer scope. Let's make it standalone so there is better clarity about what the inputs are. REPOSITORY rHG

D2818: tests: add test coverage for parsing WSGI requests

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY A subsequent commit will need to make this code more complicated in order to support alternate base URLs. Let's establish some test coverage before we diverge

D2825: hgweb: replace PATH_INFO with dispatchpath

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This was the last consumer of wsgireq.env from our WSGI applications! (Although indirect consumers of this attribute exist in wsgirequest.respond().)

D2831: hgweb: store the raw WSGI environment dict

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We need this so we can construct a new request instance from the original dict. REPOSITORY rHG Mercurial REVISION DETAIL

D2824: hgweb: rewrite path generation for index entries

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I think this code is easier to read. But the real reason to do this is to eliminate a consumer of wsgirequest. REPOSITORY rHG Mercurial REVISION DETAIL

D2813: hgweb: move archivelist to standalone function

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This doesn't need to exist as an inline function in a method. Minor formatting changes were made as part of the move. REPOSITORY rHG Mercurial REVISION

D2817: hgweb: construct static URL like hgweb does

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY hgwebdir has a bit of code for constructing URLs. This reinvents wheels from our parsedrequest instance. And sometimes the behavior varies from what hgweb

D2828: hgweb: pass modern request type into templater()

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Only a handful of consumers of wsgirequest remaining in this file... REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2828

D2821: hgweb: clarify that apppath begins with a forward slash

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg 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/D2821 AFFECTED FILES mercurial/hgweb/request.py CHANGE DETAILS diff --git

D2826: hgweb: don't pass wsgireq to makeindex and other functions

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We only ever access attributes that are available on our newer request type. So we no longer need this argument. REPOSITORY rHG Mercurial REVISION DETAIL

D2820: hgweb: change how dispatch path is reported

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY When I implemented the new request object, I carried forward some ugly hacks until I could figure out what was happening. One of those was the handling of

D2812: hgweb: move readallowed to a standalone function

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY hgwebdir s kind of large. Let's make the class smaller by moving things that don't need to be there. REPOSITORY rHG Mercurial REVISION DETAIL

D2819: hgweb: refactor repository name URL parsing

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The hgwebdir WSGI application detects when a requested URL is for a known repository and it effectively forwards the request to the hgweb WSGI application.

D2816: hgweb: remove unused **map argument

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It was unused before the recent code refactoring AFAICT. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2816 AFFECTED FILES

D2805: hgweb: remove some use of wsgireq in hgwebdir

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 6877. indygreg edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2805?vs=6866=6877 REVISION DETAIL https://phab.mercurial-scm.org/D2805 AFFECTED FILES

D2822: hgweb: support constructing URLs from an alternate base URL

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The web.baseurl config option allows server operators to define a custom URL for hosted content. The way it works today is that hgwebdir parses this config

D2815: hgweb: extract entries() to standalone function

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY There was some real wonkiness going on here. Essentially, the inline function was being executed with default arguments because a function reference was passed

D2823: hgweb: construct {url} with req.apppath

2018-03-12 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is how the hgweb WSGI application does it. Let's make the behavior consistent. REPOSITORY rHG Mercurial REVISION DETAIL

D2776: hgweb: use a multidict for holding query string parameters

2018-03-12 Thread durin42 (Augie Fackler)
durin42 added inline comments. INLINE COMMENTS > request.py:31 > > +class multidict(object): > +"""A dict like object that can store multiple values for a key. I'm a little uncomfortable with this not advertising that it's not a hash table, and htat lookups are O(N). Maybe send a

[PATCH STABLE] hgweb: garbage collect on every request

2018-03-12 Thread Gregory Szorc
# HG changeset patch # User Gregory Szorc # Date 1520885700 25200 # Mon Mar 12 13:15:00 2018 -0700 # Branch stable # Node ID 46905416a5f47e9e46aa2db0e2e4f45e7414c979 # Parent 9639c433be54191b4136b48fe70fc8344d2b5db2 hgweb: garbage collect on every request There

D2761: rebase: use configoverride context manager for ui.forcemerge

2018-03-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 6873. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2761?vs=6789=6873 REVISION DETAIL https://phab.mercurial-scm.org/D2761 AFFECTED FILES hgext/rebase.py CHANGE DETAILS diff --git a/hgext/rebase.py

D2760: rebase: also restore "ui.allowemptycommit" value

2018-03-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 6872. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2760?vs=6788=6872 REVISION DETAIL https://phab.mercurial-scm.org/D2760 AFFECTED FILES hgext/rebase.py CHANGE DETAILS diff --git a/hgext/rebase.py

D2810: rebase: inline _performrebasesubset()

2018-03-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that most of _performrebasesubset() has been moved into _rebasenode(), it's simple enough that we can inline it. REPOSITORY rHG Mercurial REVISION

D2809: rebase: extract function for rebasing a single node

2018-03-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We currently have _performrebase() and _performrebasesubset(), but we don't have a method for rebasing a single node (that's inside a loop in

D2811: rebase: move constant expressions out of inner loop in _performrebase()

2018-03-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D2811 AFFECTED FILES hgext/rebase.py CHANGE DETAILS diff --git a/hgext/rebase.py b/hgext/rebase.py

Re: [PATCH 3 of 3] sshpeer: drop support for not reading stderr

2018-03-12 Thread Gregory Szorc
On Mon, Mar 12, 2018 at 7:17 AM, Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara > # Date 1520858773 -32400 > # Mon Mar 12 21:46:13 2018 +0900 > # Node ID e6071590cd3e6e376ff45a11204065f08f72eee8 > # Parent

Re: [PATCH 2 of 3] debugwireproto: dump server's stderr to temporary file if --noreadstderr

2018-03-12 Thread Gregory Szorc
On Mon, Mar 12, 2018 at 7:17 AM, Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara > # Date 1520858510 -32400 > # Mon Mar 12 21:41:50 2018 +0900 > # Node ID d3dd691a3fce0c501a34ed68d1a08b563a78794c > # Parent

Re: [PATCH 1 of 3] debugwireproto: close the write end before consuming all available data

2018-03-12 Thread Gregory Szorc
On Mon, Mar 12, 2018 at 7:17 AM, Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara > # Date 1520862453 -32400 > # Mon Mar 12 22:47:33 2018 +0900 > # Node ID 2e2a5376d006ad77ba9a07d341f6bc5418289af1 > # Parent

[Bug 5816] New: mq doesn't correctly block hg commit --amend on mq-managed commits

2018-03-12 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=5816 Bug ID: 5816 Summary: mq doesn't correctly block hg commit --amend on mq-managed commits Product: Mercurial Version: unspecified Hardware: PC OS: Linux

D2744: hgweb: handle CONTENT_LENGTH

2018-03-12 Thread mharbison72 (Matt Harbison)
mharbison72 added inline comments. INLINE COMMENTS > request.py:205 > +# sent. But for all intents and purposes it should be OK to lie about > +# this, since a consumer will either either value to determine how many > +# bytes are available to read. typo: "... will either either

[PATCH 1 of 3] debugwireproto: close the write end before consuming all available data

2018-03-12 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1520862453 -32400 # Mon Mar 12 22:47:33 2018 +0900 # Node ID 2e2a5376d006ad77ba9a07d341f6bc5418289af1 # Parent ff541b8cdee0cf9b75874639388bdc8b9854ac20 debugwireproto: close the write end before consuming all available data

[PATCH 3 of 3] sshpeer: drop support for not reading stderr

2018-03-12 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1520858773 -32400 # Mon Mar 12 21:46:13 2018 +0900 # Node ID e6071590cd3e6e376ff45a11204065f08f72eee8 # Parent d3dd691a3fce0c501a34ed68d1a08b563a78794c sshpeer: drop support for not reading stderr It's handled by caller now.

[PATCH 2 of 3] debugwireproto: dump server's stderr to temporary file if --noreadstderr

2018-03-12 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1520858510 -32400 # Mon Mar 12 21:41:50 2018 +0900 # Node ID d3dd691a3fce0c501a34ed68d1a08b563a78794c # Parent 2e2a5376d006ad77ba9a07d341f6bc5418289af1 debugwireproto: dump server's stderr to temporary file if --noreadstderr

D2808: remotenames: show remote bookmarks in `hg bookmarks`

2018-03-12 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This patch adds functionality to show list of remote bookmarks in `hg bookmarks` command. There is some indenting problem in the test output as the current

D2395: stack: add a new module for stack-related commands

2018-03-12 Thread lothiraldan (Boris Feld)
lothiraldan added a comment. I don't remember a particular point that needed to be cleaned before merging this series. I think the next steps are to introduce a Stack object, update core commands to works with stacks and introduce new commands related to stacks according to my memories and

<    1   2