Auto status change to "Under Review"
Show More
@@ -311,6 +311,7 b' class BaseRepository(object):' | |||||
311 | DEFAULT_CONTACT = u"Unknown" |
|
311 | DEFAULT_CONTACT = u"Unknown" | |
312 | DEFAULT_DESCRIPTION = u"unknown" |
|
312 | DEFAULT_DESCRIPTION = u"unknown" | |
313 | EMPTY_COMMIT_ID = '0' * 40 |
|
313 | EMPTY_COMMIT_ID = '0' * 40 | |
|
314 | COMMIT_ID_PAT = re.compile(r'[0-9a-fA-F]{40}') | |||
314 |
|
315 | |||
315 | path = None |
|
316 | path = None | |
316 |
|
317 |
@@ -618,7 +618,7 b' class GitRepository(BaseRepository):' | |||||
618 | else: |
|
618 | else: | |
619 | output, __ = self.run_git_command( |
|
619 | output, __ = self.run_git_command( | |
620 | ['merge-base', commit_id1, commit_id2]) |
|
620 | ['merge-base', commit_id1, commit_id2]) | |
621 |
ancestor_id = |
|
621 | ancestor_id = self.COMMIT_ID_PAT.findall(output)[0] | |
622 |
|
622 | |||
623 | log.debug('Found common ancestor with sha: %s', ancestor_id) |
|
623 | log.debug('Found common ancestor with sha: %s', ancestor_id) | |
624 |
|
624 | |||
@@ -642,7 +642,7 b' class GitRepository(BaseRepository):' | |||||
642 | '%s..%s' % (commit_id1, commit_id2)]) |
|
642 | '%s..%s' % (commit_id1, commit_id2)]) | |
643 | commits = [ |
|
643 | commits = [ | |
644 | repo1.get_commit(commit_id=commit_id, pre_load=pre_load) |
|
644 | repo1.get_commit(commit_id=commit_id, pre_load=pre_load) | |
645 |
for commit_id in |
|
645 | for commit_id in self.COMMIT_ID_PAT.findall(output)] | |
646 |
|
646 | |||
647 | return commits |
|
647 | return commits | |
648 |
|
648 |
@@ -171,9 +171,9 b' data = {' | |||||
171 | <tr> |
|
171 | <tr> | |
172 | <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td> |
|
172 | <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td> | |
173 | <td style="line-height:20px;"> |
|
173 | <td style="line-height:20px;"> | |
174 |
<code>${' |
|
174 | <code>${data['source_ref_type']}:${pull_request.source_ref_parts.name}</code> ${_('of')} ${data['source_repo_url']} | |
175 | → |
|
175 | → | |
176 |
<code>${' |
|
176 | <code>${data['target_ref_type']}:${pull_request.target_ref_parts.name}</code> ${_('of')} ${data['target_repo_url']} | |
177 | </td> |
|
177 | </td> | |
178 | </tr> |
|
178 | </tr> | |
179 |
|
179 |
@@ -124,9 +124,9 b' data = {' | |||||
124 | <tr> |
|
124 | <tr> | |
125 | <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td> |
|
125 | <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td> | |
126 | <td style="line-height:20px;"> |
|
126 | <td style="line-height:20px;"> | |
127 |
<code>${' |
|
127 | <code>${data['source_ref_type']}:${pull_request.source_ref_parts.name}</code> ${_('of')} ${data['source_repo_url']} | |
128 | → |
|
128 | → | |
129 |
<code>${' |
|
129 | <code>${data['target_ref_type']}:${pull_request.target_ref_parts.name}</code> ${_('of')} ${data['target_repo_url']} | |
130 | </td> |
|
130 | </td> | |
131 | </tr> |
|
131 | </tr> | |
132 |
|
132 |
@@ -129,9 +129,9 b' data = {' | |||||
129 | <tr> |
|
129 | <tr> | |
130 | <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td> |
|
130 | <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td> | |
131 | <td style="line-height:20px;"> |
|
131 | <td style="line-height:20px;"> | |
132 |
<code>${' |
|
132 | <code>${data['source_ref_type']}:${pull_request.source_ref_parts.name}</code> ${_('of')} ${data['source_repo_url']} | |
133 | → |
|
133 | → | |
134 |
<code>${' |
|
134 | <code>${data['target_ref_type']}:${pull_request.target_ref_parts.name}</code> ${_('of')} ${data['target_repo_url']} | |
135 | </td> |
|
135 | </td> | |
136 | </tr> |
|
136 | </tr> | |
137 |
|
137 |
@@ -143,9 +143,9 b'' | |||||
143 | ## pull url |
|
143 | ## pull url | |
144 | <li> |
|
144 | <li> | |
145 | %if h.is_hg(c.pull_request.source_repo): |
|
145 | %if h.is_hg(c.pull_request.source_repo): | |
146 | <% clone_url = 'hg pull -r {} {}'.format(h.short_id(c.source_ref), c.pull_request.source_repo.clone_url()) %> |
|
146 | <% clone_url = u'hg pull -r {} {}'.format(h.short_id(c.source_ref), c.pull_request.source_repo.clone_url()) %> | |
147 | %elif h.is_git(c.pull_request.source_repo): |
|
147 | %elif h.is_git(c.pull_request.source_repo): | |
148 | <% clone_url = 'git pull {} {}'.format(c.pull_request.source_repo.clone_url(), c.pull_request.source_ref_parts.name) %> |
|
148 | <% clone_url = u'git pull {} {}'.format(c.pull_request.source_repo.clone_url(), c.pull_request.source_ref_parts.name) %> | |
149 | %endif |
|
149 | %endif | |
150 |
|
150 | |||
151 | <span>${_('Pull changes from source')}</span>: <input type="text" class="input-monospace pr-pullinfo" value="${clone_url}" readonly="readonly"> |
|
151 | <span>${_('Pull changes from source')}</span>: <input type="text" class="input-monospace pr-pullinfo" value="${clone_url}" readonly="readonly"> |
General Comments 1
You need to be logged in to leave comments.
Login now