Mercurial > kallithea
changeset 6333:73654990ba75
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.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 15 Nov 2016 22:53:41 +0100 |
parents | 8076de6f78af |
children | 9c6f717823e1 |
files | kallithea/controllers/pullrequests.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py Tue Nov 15 22:53:41 2016 +0100 +++ b/kallithea/controllers/pullrequests.py Tue Nov 15 22:53:41 2016 +0100 @@ -328,9 +328,8 @@ 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