[PATCH 0 of 6] reStructuredText help output

Martin Geisler mg at lazybytes.net
Wed Jul 15 14:59:43 UTC 2009


Dan Villiom Podlaski Christiansen <danchr at gmail.com> writes:

> On 10/07/2009, at 13.54, Martin Geisler wrote:
>
>> Hello everybody,
>>
>> I've been talking about using reStructuredText for the help strings
>> and a couple of days ago I took at stab at turning the talk into code.
>
> That's very nice indeed!
>
> I once wrote up a small patch for installing the Zsh completion script
> through setup.py, hoping that it could be useful for something like this :)

I'm sorry, but I dont see how the Zsh completion script relates to the
reStructuredText patches?

Also, shouldn't we remove the Zsh script now that it is included in Zsh
proper? I can see it's there with your handy Zsh CVS mirror:

  http://bitbucket.org/danchr/zsh/changeset/25827f2da69f/

> # HG changeset patch
> # User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
> # Date 1247229008 -7200
> # Node ID 2bd3c7b98188e6c9867c2a0fa0af8457de67bc4a
> # Parent  a507bac702f1cb8fd2adef5965a924f1285d461d
> setup: allow installation of data files into the regular data dir.
>
> The Zsh completion script is used as an example and test case.
> diff --git a/contrib/zsh_completion b/contrib/zsh/_hg
> rename from contrib/zsh_completion
> rename to contrib/zsh/_hg
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -157,9 +157,16 @@ except ImportError:
>
>  class install_package_data(install_data):
>      def finalize_options(self):
> +        self.install_lib = None
>          self.set_undefined_options('install',
> -                                   ('install_lib', 'install_dir'))
> +                                   ('install_lib', 'install_lib'))
>          install_data.finalize_options(self)
> +        self.install_lib = self.install_lib.rstrip(os.sep)
> +        def expandoptions((k, v)):
> +            if '[install_lib]' in k:
> +                k = k.replace('[install_lib]', self.install_lib)

I think this looks strange -- you propose we start putting magic strings
like that into the list of files to install? There has got to be a
better way :-)

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20090715/eb73dfe0/attachment.asc>


More information about the Mercurial-devel mailing list