Changeset - 73654990ba75
[Not reviewed]
default
0 1 0
Mads Kiilerich - 9 years ago 2016-11-15 22:53:41
madski@unity3d.com
pullrequests: fix 'upgrade' from revision to branch when creating PR

This will do that the default title for the PR created from a non-head revision
will contain a short hash instead a long.

org_ref_type was set to 'branch' while org_ref_name remained the full hash.
h.short_ref would thus not truncate. Instead, we keep the org_ref_type as 'rev'
while storing the branch name in the database.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -328,9 +328,8 @@ class PullrequestsController(BaseRepoCon
 
         org_ref_name,
 
         org_rev) = org_ref.split(':')
 
        if org_ref_type == 'rev':
 
            org_ref_type = 'branch'
 
            cs = org_repo.scm_instance.get_changeset(org_rev)
 
            org_ref = '%s:%s:%s' % (org_ref_type, cs.branch, cs.raw_id)
 
            org_ref = 'branch:%s:%s' % (cs.branch, cs.raw_id)
 

	
 
        other_repo_name = _form['other_repo']
 
        other_ref = _form['other_ref'] # will have symbolic name and head revision
0 comments (0 inline, 0 general)