changeset 5505:41fe196eeaf5 stable

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.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 16 Sep 2015 02:54:32 +0200
parents 9416093966a0
children 1ea1761bab12
files kallithea/controllers/pullrequests.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py	Wed Sep 16 02:54:32 2015 +0200
+++ b/kallithea/controllers/pullrequests.py	Wed Sep 16 02:54:32 2015 +0200
@@ -615,10 +615,11 @@
                     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))