Changeset - 3d968d66c9b9
[Not reviewed]
default
0 2 0
Mads Kiilerich - 11 years ago 2014-08-21 23:46:55
madski@unity3d.com
pull requests: use verbose URLs in as many places as possible - they are helpful
2 files changed with 5 insertions and 9 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -554,8 +554,7 @@ class PullrequestsController(BaseRepoCon
 
            h.flash(_('Error occurred while creating pull request'),
 
                    category='error')
 
            log.error(traceback.format_exc())
 
            return redirect(url('pullrequest_show', repo_name=repo_name,
 
                                pull_request_id=pull_request_id))
 
            return redirect(old_pull_request.url())
 

	
 
        ChangesetCommentsModel().create(
 
            text=_('Closed, replaced by %s .') % h.canonical_url('pullrequest_show',
 
@@ -571,8 +570,7 @@ class PullrequestsController(BaseRepoCon
 
        h.flash(_('Pull request update created'),
 
                category='success')
 

	
 
        return redirect(url('pullrequest_show', repo_name=old_pull_request.other_repo.repo_name,
 
                            pull_request_id=pull_request.pull_request_id))
 
        return redirect(pull_request.url())
 

	
 
    # pullrequest_post for PR editing
 
    @LoginRequired()
 
@@ -594,8 +592,7 @@ class PullrequestsController(BaseRepoCon
 
        Session().commit()
 
        h.flash(_('Pull request updated'), category='success')
 

	
 
        return redirect(url('pullrequest_show', repo_name=repo.repo_name,
 
                            pull_request_id=pull_request_id))
 
        return redirect(pull_request.url())
 

	
 
    # pullrequest_update for updating reviewer list
 
    @LoginRequired()
 
@@ -733,8 +730,7 @@ class PullrequestsController(BaseRepoCon
 
        Session().commit()
 

	
 
        if not request.environ.get('HTTP_X_PARTIAL_XHR'):
 
            return redirect(h.url('pullrequest_show', repo_name=repo_name,
 
                                  pull_request_id=pull_request_id))
 
            return redirect(pull_request.url())
 

	
 
        data = {
 
           'target_id': h.safeid(h.safe_unicode(request.POST.get('f_path'))),
kallithea/model/db.py
Show inline comments
 
@@ -2311,7 +2311,7 @@ class PullRequest(Base, BaseModel):
 
        import kallithea.lib.helpers as h
 
        s = '/' + self.title
 
        b = self.org_ref_parts[1]
 
        if b not in s and b != self.other_ref_parts[1]:
 
        if b != self.other_ref_parts[1]:
 
            s = '/_%s_%s' % (b, s)
 
        kwargs['extra'] = urlreadable(s)
 
        if canonical:
0 comments (0 inline, 0 general)