Author: tille
Date: 2012-05-11 13:55:50 +0000 (Fri, 11 May 2012)
New Revision: 2308

Modified:
   udd/udd/blends_prospective_gatherer.py
Log:
Less noise for Vcs-Browser problems


Modified: udd/udd/blends_prospective_gatherer.py
===================================================================
--- udd/udd/blends_prospective_gatherer.py      2012-05-11 03:00:28 UTC (rev 
2307)
+++ udd/udd/blends_prospective_gatherer.py      2012-05-11 13:55:50 UTC (rev 
2308)
@@ -232,7 +232,13 @@
              self.log.warning("Control file for source '%s' is lacking source 
field" % (source))
            if src.has_key('vcs-browser'):
              if sprosp['vcs_browser'] != src['vcs-browser']:
-                self.log.warning("%s - Differing Vcs-Browser:  Obtained from 
Vcs-Browser='%s' <-> control has '%s'." % (source, sprosp['vcs_browser'], 
src['Vcs-Browser']))
+               abc = re.sub('/$', '', sprosp['vcs_browser']) # ignore 
forgotten '/' at end of Vcs-Browser
+               if abc != src['vcs-browser']:
+                 abc = re.sub('^git:', 'http:', src['vcs-browser']) # check 
for usual error in specifying Vcs-Browser by just leaving 'git:' as protocol
+                 if abc == sprosp['vcs_browser']:
+                   self.log.error("%s - Wrong Vcs-Browser: Use 'http:' instead 
of 'git:' in '%s'." % (source, src['Vcs-Browser']))
+                 else:
+                    self.log.warning("%s - Differing Vcs-Browser:  Obtained 
from Vcs-Browser='%s' <-> control has '%s'." % (source, sprosp['vcs_browser'], 
src['Vcs-Browser']))
             else:
              self.log.info("Control file for source '%s' is lacking 
Vcs-Browser field" % (source))
 


_______________________________________________
Collab-qa-commits mailing list
Collab-qa-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/collab-qa-commits

Reply via email to