[MERGE][1.0] Rename pack-0.92 to pack-0-92 to fix User Reference generation
Alexander Belchenko
bialix at ukr.net
Fri Dec 7 04:40:39 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ian Clatworthy пишет:
> Checking the User Reference generation today, it was broken because ReST
> gets confused if an option has a '.' in it. The init, init-repo and
> upgrade commands all have that due to the pack-0.92 format name being
> options.
>
> This patch fixes that by renaming the format to pack-0-92. We could make
> it pack-092 if people prefer. It doesn't matter a lot UI wise because
> it's the default now anyway, but the pattern ought to be consistent
> going forward and I think the '-' in place of a '.' is better than
> leaving it out.
Ian, I think we can rename it in generate_docs script to pack-0-92 or pack-0_92
and then after html generation rename it back to pack-0.92.
It's ugly hack, but it works now. It probably break our docs if one day --pack-0.92 will be referred
from body text.
=== modified file 'tools/doc_generate/autodoc_rstx.py'
- --- tools/doc_generate/autodoc_rstx.py 07.08.2007 22:18:38
+++ tools/doc_generate/autodoc_rstx.py 07.12.2007 6:37:22
@@ -111,6 +111,7 @@
continue
heading = cmd_name
text = cmd_object.get_help_text(plain=False, see_also_as_links=True)
+ text = text.replace('--pack-0.92', '--pack-0-92')
lines.append(heading)
lines.append(hdg_level2 * len(heading))
lines.append(text)
=== modified file 'tools/rst2html.py'
- --- tools/rst2html.py 07.08.2007 17:56:50
+++ tools/rst2html.py 07.12.2007 6:29:48
@@ -36,6 +36,16 @@
y = y.replace('href="#tags"', 'href="#tags_"')
return y
+ def visit_Text(self, node):
+ text = node.astext()
+ encoded = self.encode(text)
+ if self.in_mailto and self.settings.cloak_email_addresses:
+ encoded = self.cloak_email(encoded)
+ # restore our options
+ encoded = encoded.replace('--pack-0-92', '--pack-0.92')
+ self.body.append(encoded)
+
+
mywriter = html4css1.Writer()
mywriter.translator_class = IESafeHtmlTranslator
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHWM7HzYr338mxwCURAix9AKCBlHn1m88RpWX0xJI70s1oN4wL3ACglHOp
lAJnS7w8L2dzMdv2rwPByI0=
=6CjG
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list