damned-lies r1334 - in trunk: . stats



Author: claudep
Date: Sat Jan 10 17:00:28 2009
New Revision: 1334
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1334&view=rev

Log:
2009-01-10  Claude Paroz  <claude 2xlibre net>

	* stats/models.py: For git (and hg?) modules, all branches share the same
	vcs_root.
	Don't make vcs_root an URLField, too picky about validation.

Modified:
   trunk/ChangeLog
   trunk/stats/models.py

Modified: trunk/stats/models.py
==============================================================================
--- trunk/stats/models.py	(original)
+++ trunk/stats/models.py	Sat Jan 10 17:00:28 2009
@@ -56,7 +56,8 @@
     bugs_product = models.CharField(max_length=50)
     bugs_component = models.CharField(max_length=50, null=True, blank=True)
     vcs_type = models.CharField(max_length=5, choices=VCS_TYPE_CHOICES)
-    vcs_root = models.URLField(verify_exists=False)
+    # URLField is too restrictive for vcs_root
+    vcs_root = models.CharField(max_length=200)
     vcs_web = models.URLField()
     
     maintainers = models.ManyToManyField(Person, db_table='module_maintainer',
@@ -187,7 +188,7 @@
            
     def get_vcs_url(self):
         if self.module.vcs_type in ('hg', 'git'):
-            return utils.url_join(self.module.vcs_root, self.module_name)
+            return utils.url_join(self.module.vcs_root)
         elif self.vcs_subpath:
             return utils.url_join(self.module.vcs_root, self.module.name, self.vcs_subpath)
         elif self.is_head():



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]