[Python-apps-team] mercurial spec broken

Martin Geisler mg at lazybytes.net
Wed Dec 9 10:12:11 UTC 2009


Vincent Danjean <vdanjean at debian.org> writes:

> It is hardcoded but at the end of directories that are tried :
> --- a/mercurial/templater.py
> +++ b/mercurial/templater.py
> @@ -9,7 +9,7 @@
>  import re, sys, os
>  import util, config, templatefilters
>
> -path = ['templates', '../templates']
> +path = ['templates', '../templates', '/usr/share/mercurial/templates']
>  stringify = templatefilters.stringify
>
>  def parsestring(s, quoted=True):
>
> So, if you put your templates where 'standard' mercurial put them,
> they will be used.

Yes, that was the patch I was talking about. I think it would be fine
for Mercurial to simply add that path as a standard template path.

> About paths, the Debian package also changes the directory for help
> files: they are put in /usr/share/mercurial/help

Right, We could add that directory to the search path too. It currently
searched in ./help and ../help relative to the mercurial/help.py file.

> The goal of these two changes is that Debian packages fully respect
> the FSH (ie arch independant files in /usr/share/package). Other
> distro might be interested but I fully understand it is not
> necessarily a good thing for local installs.
>
> While I am at it, there are three patched in the Debian package that
> can be interesting upstream:
> - one that rewrite the doc for zeroconf (proposed by a user)

Please send such patches to us! :-) We obviously want everybody to
benefit from better documentation.

> - one that does not install i18n files (they are only useful for
>   developers and translators, not for users)

We've dropped that in revision 4a3c388f8c69:

  http://www.selenic.com/hg/rev/4a3c388f8c69

> - one that remove the shangline from modules that are used as modules
>   and not as plain programs (ie not installed in /usr/bin nor invoked
>   directly)

I see #! in lsprof.py and simplemerge.py. I think it's been left behind
because those files have an upstream version too, and so it's nice for
us to change as little as possible in them.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.



More information about the Python-apps-team mailing list