[PATCH] serve: introduce --get and --post for easy testing of hgweb

Sune Foldager cryo at cyanite.org
Sun Feb 10 08:19:36 CST 2013

On 2013-02-10 13:18, Mads Kiilerich wrote:
>On 02/10/2013 12:43 PM, Brodie Rao wrote:
>>(Resending, forgot to CC the list.)
>>On Sat, Feb 9, 2013 at 11:22 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
>>># HG changeset patch
>>># User Mads Kiilerich <mads at kiilerich.com>
>>># Date 1359297965 -3600
>>># Node ID 86f6b4786d8d292843a9509b0c99f8e855ef4e9d
>>># Parent  19f90544863eadb00baf80ef21811d41b2beb54b
>>>serve: introduce --get and --post for easy testing of hgweb
>>>These options can be useful both in the test suite and for other kinds of hgweb
>>>diff --git a/mercurial/commands.py b/mercurial/commands.py
>>>--- a/mercurial/commands.py
>>>+++ b/mercurial/commands.py
>>>@@ -8,7 +8,7 @@
>>>  from node import hex, bin, nullid, nullrev, short
>>>  from lock import release
>>>  from i18n import _, gettext
>>>-import os, re, difflib, time, tempfile, errno
>>>+import os, re, difflib, time, tempfile, errno, sys
>>>  import hg, scmutil, util, revlog, extensions, copies, error, bookmarks
>>>  import patch, help, encoding, templatekw, discovery
>>>  import archival, changegroup, cmdutil, hbisect
>>>@@ -5251,7 +5251,9 @@
>>>      ('t', 'templates', '', _('web templates to use'), _('TEMPLATE')),
>>>      ('', 'style', '', _('template style to use'), _('STYLE')),
>>>      ('6', 'ipv6', None, _('use IPv6 in addition to IPv4')),
>>>-    ('', 'certificate', '', _('SSL certificate file'), _('FILE'))],
>>>+    ('', 'certificate', '', _('SSL certificate file'), _('FILE')),
>>>+    ('', 'get', '', _('just GET url'), _('URL')),
>>>+    ('', 'post', '', _('just POST url'), _('URL'))],
>>Do these options need to be exposed by default? I feel like they might
>>be better as debug options.
>Perhaps? But it is not that it is exposing Mercurial internals as 
>most other debug commands do.

But "just GET url" is a bit weird, I agree with Brodie. I mean, what does that even mean?


More information about the Mercurial-devel mailing list