Skip to content
Snippets Groups Projects
Commit 0b8232ec744b authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

conf2reST.py: Prefer anonymous links

With a single underscore, the "link target" system is used, resulting in
conflicts when the same version name is shared by 2 repos.
parent 2808ca9d9495
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,9 @@
History
=======
- conf2reST.py: Prefer anonymous links to avoid conflicts when the same version is shared by 2
repos (as the "link target" system would then be in use).
2.8
---
......
......@@ -173,4 +173,8 @@
def write_rst(out, rst, headers=True):
"""Write rst to out (be it an open file or std out).
We use anonymous links here (2 underscores) to avoid conflicts when the
same version is shared by 2 repos (as the "link target" system would then
be in use).
"""
......@@ -176,4 +180,5 @@
"""
out.write("Versions\n")
out.write("========\n\n")
for group in ('odoo', 'modules', 'group of modules', 'other', 'tools'):
......@@ -191,10 +196,10 @@
version = rst[group][element]['version']
repository = rst[group][element].get('repository', '')
if repository.startswith('ssh://hg@bitbucket.org/'):
text = '`%s <%s/commits/%s>`_' % (
text = '`%s <%s/commits/%s>`__' % (
version,
repository.replace(
'ssh://hg@bitbucket.org/',
'https://bitbucket.org/'),
version)
elif repository.startswith('git@bitbucket.org:'):
......@@ -195,10 +200,10 @@
version,
repository.replace(
'ssh://hg@bitbucket.org/',
'https://bitbucket.org/'),
version)
elif repository.startswith('git@bitbucket.org:'):
text = '`%s <%s/commits/%s>`_' % (
text = '`%s <%s/commits/%s>`__' % (
version,
repository.replace(
'git@bitbucket.org:',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment