changeset 4463:d2f71ee1c738

pull requests: allow git pull requests
author domruf <dominikruf@gmail.com>
date Tue, 19 Aug 2014 21:10:09 +0200
parents fb5760e8ba43
children 20ec646170b3
files kallithea/controllers/pullrequests.py kallithea/templates/base/base.html
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py	Mon Aug 18 21:04:36 2014 +0200
+++ b/kallithea/controllers/pullrequests.py	Tue Aug 19 21:10:09 2014 +0200
@@ -573,6 +573,8 @@
         c.available = []
         c.cs_branch_name = c.cs_ref_name
         other_scm_instance = c.a_repo.scm_instance
+        c.update_msg = ""
+        c.update_msg_other = ""
         if org_scm_instance.alias == 'hg' and c.a_ref_name != 'ancestor':
             if c.cs_ref_type != 'branch':
                 c.cs_branch_name = org_scm_instance.get_changeset(c.cs_ref_name).branch # use ref_type ?
@@ -602,6 +604,8 @@
                     h.short_id(org_scm_instance.get_changeset((max(revs))).raw_id))
             else:
                 c.update_msg_other = _('Branch %s does not contain other changes.') % c.cs_branch_name
+        elif org_scm_instance.alias == 'git':
+            c.update_msg = _("Git pull requests don't support updates yet.")
 
         raw_ids = [x.raw_id for x in c.cs_ranges]
         c.cs_comments = c.cs_repo.get_comments(raw_ids)
--- a/kallithea/templates/base/base.html	Mon Aug 18 21:04:36 2014 +0200
+++ b/kallithea/templates/base/base.html	Tue Aug 19 21:10:09 2014 +0200
@@ -193,9 +193,7 @@
                   </a>
                   </li>
                   <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}"><i class="icon-code-fork"></i> ${_('Fork')}</a></li>
-                  %if h.is_hg(c.db_repo_scm_instance):
                   <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-code-fork"></i> ${_('Create Pull Request')}</a></li>
-                  %endif
               %endif
              </ul>
         </li>