changeset 2245:2d35bbff7c35 codereview

simplified compare url logic for outside repos
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 08 May 2012 02:10:49 +0200
parents 77e376fdc4c6
children 85f31a1b69dc
files rhodecode/controllers/compare.py
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/compare.py	Tue May 08 02:04:28 2012 +0200
+++ b/rhodecode/controllers/compare.py	Tue May 08 02:10:49 2012 +0200
@@ -48,8 +48,6 @@
         """
         Parse the org...other string
         Possible formats are `(branch|book|tag):<name>...(branch|book|tag):<othername>`
-        or using a repo <empty>...(repo:</rhodecode/path/to/other)
-
 
         :param ref: <orginal_reference>...<other_reference>
         :type ref: str
@@ -62,12 +60,11 @@
             return _repo, (name, val)
 
         def other_parser(other):
+            _other_repo = request.GET.get('repo')
             _repo = org_repo
             name, val = other.split(':')
-            if 'repo' in other:
-                _repo = val
-                name = 'branch'
-                val = c.rhodecode_repo.DEFAULT_BRANCH_NAME
+            if _other_repo:
+                _repo = _other_repo #TODO: do an actual repo loookup within rhodecode
 
             return _repo, (name, val)