[Python-modules-commits] r24117 - in tools (add-vcs-fields)
jwilk at users.alioth.debian.org
jwilk at users.alioth.debian.org
Sun May 5 13:33:22 UTC 2013
Date: Sunday, May 5, 2013 @ 13:33:21
Author: jwilk
Revision: 24117
Add Vcs-* fields even when only one of them is missing.
Modified:
tools/add-vcs-fields
Modified: tools/add-vcs-fields
===================================================================
--- tools/add-vcs-fields 2013-05-05 13:31:42 UTC (rev 24116)
+++ tools/add-vcs-fields 2013-05-05 13:33:21 UTC (rev 24117)
@@ -38,10 +38,17 @@
first, tail = contents.split('\n\n', 1)
first = deb822.Deb822(first.splitlines())
source = first['Source']
- if first.get('Vcs-Svn') or first.get('Vcs-Browser'):
+ dirty = False
+ vcs_svn = first.get('Vcs-Svn')
+ vcs_browser = first.get('Vcs-Browser')
+ if not vcs_svn:
+ first['Vcs-Svn'] = 'svn://anonscm.debian.org/{team}/packages/{source}/trunk/'.format(team=team, source=source)
+ dirty = True
+ if not vcs_browser:
+ first['Vcs-Browser'] = 'http://anonscm.debian.org/viewvc/{team}/packages/{source}/trunk/'.format(team=team, source=source)
+ dirty = True
+ if not dirty:
continue
- first['Vcs-Svn'] = 'svn://anonscm.debian.org/{team}/packages/{source}/trunk/'.format(team=team, source=source)
- first['Vcs-Browser'] = 'http://anonscm.debian.org/viewvc/{team}/packages/{source}/trunk/'.format(team=team, source=source)
with open('{base}/debian/control'.format(base=path), 'w') as file:
print >>file, unicode(first).encode('UTF-8')
print >>file, tail,
More information about the Python-modules-commits
mailing list