[damned-lies] Consider also vcs_subpath for the Web URL building



commit 55efd73a244be65bd6cd70da06e2940fbc701607
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Apr 18 23:44:48 2009 +0200

    Consider also vcs_subpath for the Web URL building
---
 stats/models.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/stats/models.py b/stats/models.py
index 9af7e0d..ab019b8 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -207,6 +207,8 @@ class Branch(models.Model):
     def get_vcs_web_url(self):
         if self.module.vcs_type in ('hg', 'git'):
             return self.module.vcs_web
+        elif self.vcs_subpath:
+            return utils.url_join(self.module.vcs_web, self.vcs_subpath)
         elif self.is_head():
             return utils.url_join(self.module.vcs_web, "trunk")
         else:



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