# HG changeset patch # User Mads Kiilerich # Date 2016-09-06 00:51:18 # Node ID 323ccdd4579ba922db255fc9bd1f86871bca3b48 # Parent 470fac0795431bc8c45370b630be079a961636df pullrequests: when creating PRs from/to revisions, shorten the visible name Having the long name in the UI was annoying ... and we still have the full hash elsewhere in the 'ref'. diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -339,6 +339,10 @@ class PullrequestsController(BaseRepoCon (other_ref_type, other_ref_name, other_rev) = other_ref.split(':') + if other_ref_type == 'rev': + cs = other_repo.scm_instance.get_changeset(other_rev) + other_ref_name = cs.raw_id[:12] + other_ref = '%s:%s:%s' % (other_ref_type, other_ref_name, cs.raw_id) cs_ranges, _cs_ranges_not, ancestor_rev = \ CompareController._get_changesets(org_repo.scm_instance.alias,