Changeset - 2d35bbff7c35
[Not reviewed]
codereview
0 1 0
Marcin Kuzminski - 14 years ago 2012-05-08 02:10:49
marcin@python-works.com
simplified compare url logic for outside repos
1 file changed with 3 insertions and 6 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/compare.py
Show inline comments
 
@@ -48,8 +48,6 @@ class CompareController(BaseRepoControll
 
        """
 
        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 @@ class CompareController(BaseRepoControll
 
            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)
 

	
0 comments (0 inline, 0 general)