[PATCH] hg-ssh: fix dispatch call to use dispatch.request()

Martin Geisler mg at lazybytes.net
Mon May 30 02:53:01 CDT 2011


Idan Kamara <idankk86 at gmail.com> writes:

> # HG changeset patch
> # User Idan Kamara <idankk86 at gmail.com>
> # Date 1306662911 -10800
> # Node ID 2a0f8e71f1c359b759caf9b2d1deea7905c746f3
> # Parent  d1a1578c5f7860b17f2f238b2c1e6adb555ffa4f
> hg-ssh: fix dispatch call to use dispatch.request()

I don't know the details here, hence this mail :-)

When I see such a commit message I ask questions like

* Why is this needed? What is gained by this?

* You write 'fix', so something seems broken. This very likely worked
  before, so why is this broken now?

* What changeset caused this to break?

I hope a search using annotate on dispatch.py would reveal all this, but
it is much more convenient when the commit message include the relevant
changeset IDs. That way tools like TortoiseHg can link directly back to
the relevant changesets.

> diff -r d1a1578c5f78 -r 2a0f8e71f1c3 contrib/hg-ssh
> --- a/contrib/hg-ssh	Fri May 27 15:59:52 2011 +0200
> +++ b/contrib/hg-ssh	Sun May 29 12:55:11 2011 +0300
> @@ -42,7 +42,7 @@
>      path = orig_cmd[6:-14]
>      repo = os.path.normpath(os.path.join(cwd, os.path.expanduser(path)))
>      if repo in allowed_paths:
> -        dispatch.dispatch(['-R', repo, 'serve', '--stdio'])
> +        dispatch.dispatch(dispatch.request(['-R', repo, 'serve', '--stdio']))
>      else:
>          sys.stderr.write("Illegal repository %r\n" % repo)
>          sys.exit(-1)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110530/c557f2ca/attachment.pgp>


More information about the Mercurial-devel mailing list