Changeset - 43a4f3b285a6
[Not reviewed]
default
0 2 0
Mads Kiilerich - 10 years ago 2015-08-26 17:28:59
madski@unity3d.com
pull requests: for "PRs" just showing ranges, just show a message instead of Target
2 files changed with 11 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -569,6 +569,13 @@ class PullrequestsController(BaseRepoCon
 
        revs = [ctx.revision for ctx in reversed(c.cs_ranges)]
 
        c.jsdata = json.dumps(graph_data(org_scm_instance, revs))
 

	
 
        c.is_range = False
 
        if c.a_ref_type == 'rev': # this looks like a free range where target is ancestor
 
            cs_a = org_scm_instance.get_changeset(c.a_rev)
 
            root_parents = c.cs_ranges[0].parents
 
            c.is_range = cs_a in root_parents
 
            #c.merge_root = len(root_parents) > 1 # a range starting with a merge might deserve a warning
 

	
 
        avail_revs = set()
 
        avail_show = []
 
        c.cs_branch_name = c.cs_ref_name
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -120,10 +120,12 @@ ${self.repo_context_bar('showpullrequest
 
              <label>${_('Target')}:</label>
 
          </div>
 
          <div class="input">
 
              <div>
 
            %if c.is_range:
 
              ${_("This is just a range of changesets and doesn't have a target or a real merge ancestor.")}
 
            %else:
 
              ${h.link_to_ref(c.pull_request.other_repo.repo_name, c.a_ref_type, c.a_ref_name)}
 
              ## we don't know other rev - c.a_rev is ancestor and not necessarily on other_name_branch branch
 
              </div>
 
            %endif
 
          </div>
 
        </div>
 
        <div class="field">
0 comments (0 inline, 0 general)