##// END OF EJS Templates
pullrequest: remove old diff code from pullrequest controller
dan -
r1183:caf127d9 default
parent child Browse files
Show More
@@ -154,25 +154,13 b' class PullrequestsController(BaseRepoCon'
154 154 comments=inline_comments
155 155 ).render_patchset(_parsed, target_commit.raw_id, source_commit.raw_id)
156 156
157
158 c.files = []
159 c.changes = {}
160 c.lines_added = 0
161 c.lines_deleted = 0
162 157 c.included_files = []
163 158 c.deleted_files = []
164 159
165 # for f in _parsed:
166 # st = f['stats']
167 # c.lines_added += st['added']
168 # c.lines_deleted += st['deleted']
169
170 # fid = h.FID('', f['filename'])
171 # c.files.append([fid, f['operation'], f['filename'], f['stats']])
172 # c.included_files.append(f['filename'])
173 # html_diff = diff_processor.as_html(enable_comments=enable_comments,
174 # parsed_lines=[f])
175 # c.changes[fid] = [f['operation'], f['filename'], html_diff, f]
160 for f in _parsed:
161 st = f['stats']
162 fid = h.FID('', f['filename'])
163 c.included_files.append(f['filename'])
176 164
177 165 def _extract_ordering(self, request):
178 166 column_index = safe_int(request.GET.get('order[0][column]'))
@@ -734,7 +722,11 b' class PullrequestsController(BaseRepoCon'
734 722 pull_request=pull_request_id)
735 723 c.inline_cnt = len(c.inline_comments)
736 724
725 self._load_compare_data(
726 c.pull_request, c.inline_comments, enable_comments=enable_comments)
727
737 728 # outdated comments
729 c.outdated_comments = {}
738 730 c.outdated_cnt = 0
739 731 if ChangesetCommentsModel.use_outdated_comments(c.pull_request):
740 732 c.outdated_comments = cc_model.get_outdated_comments(
@@ -746,11 +738,7 b' class PullrequestsController(BaseRepoCon'
746 738 c.outdated_cnt += len(comments)
747 739 if file_name not in c.included_files:
748 740 c.deleted_files.append(file_name)
749 else:
750 c.outdated_comments = {}
751 741
752 self._load_compare_data(
753 c.pull_request, c.inline_comments, enable_comments=enable_comments)
754 742
755 743 # this is a hack to properly display links, when creating PR, the
756 744 # compare view and others uses different notation, and
General Comments 0
You need to be logged in to leave comments. Login now