Changeset - 41fe196eeaf5
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 10 years ago 2015-09-16 02:54:32
madski@unity3d.com
pull requests: fix incorrect display of pull requests without updates

avail_revs would contain the top revision and thus not be empty even though no
revs were available for update.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -615,10 +615,11 @@ class PullrequestsController(BaseRepoCon
 
                    c.update_msg = _('This pull request can be updated with changes on %s:') % c.cs_branch_name
 
                else:
 
                    show = set()
 
                    avail_revs = set() # drop revs[0]
 
                    c.update_msg = _('No changesets found for updating this pull request.')
 

	
 
                # TODO: handle branch heads that not are tip-most
 
                brevs = org_scm_instance._repo.revs('%s - %ld', c.cs_branch_name, avail_revs)
 
                brevs = org_scm_instance._repo.revs('%s - %ld - %s', c.cs_branch_name, avail_revs, revs[0])
 
                if brevs:
 
                    # also show changesets that are on branch but neither ancestors nor descendants
 
                    show.update(org_scm_instance._repo.revs('::%ld - ::%ld - ::%s', brevs, avail_revs, c.a_branch_name))
0 comments (0 inline, 0 general)