changeset 4701:a14e9bff164b

pull-requests: tweak readable titles - just append /_/ and branch name
author Mads Kiilerich <madski@unity3d.com>
date Mon, 15 Dec 2014 13:47:36 +0100
parents 6a0964373a30
children 265032dfbd76
files kallithea/model/db.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/model/db.py	Mon Dec 15 13:47:36 2014 +0100
+++ b/kallithea/model/db.py	Mon Dec 15 13:47:36 2014 +0100
@@ -2309,10 +2309,11 @@
     def url(self, **kwargs):
         canonical = kwargs.pop('canonical', None)
         import kallithea.lib.helpers as h
-        s = '/' + self.title
         b = self.org_ref_parts[1]
         if b != self.other_ref_parts[1]:
-            s = '/_%s_%s' % (b, s)
+            s = '/_/' + b
+        else:
+            s = '/_/' + self.title
         kwargs['extra'] = urlreadable(s)
         if canonical:
             return h.canonical_url('pullrequest_show', repo_name=self.other_repo.repo_name,