##// 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 comments=inline_comments
154 comments=inline_comments
155 ).render_patchset(_parsed, target_commit.raw_id, source_commit.raw_id)
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 c.included_files = []
157 c.included_files = []
163 c.deleted_files = []
158 c.deleted_files = []
164
159
165 # for f in _parsed:
160 for f in _parsed:
166 # st = f['stats']
161 st = f['stats']
167 # c.lines_added += st['added']
162 fid = h.FID('', f['filename'])
168 # c.lines_deleted += st['deleted']
163 c.included_files.append(f['filename'])
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]
176
164
177 def _extract_ordering(self, request):
165 def _extract_ordering(self, request):
178 column_index = safe_int(request.GET.get('order[0][column]'))
166 column_index = safe_int(request.GET.get('order[0][column]'))
@@ -734,7 +722,11 b' class PullrequestsController(BaseRepoCon'
734 pull_request=pull_request_id)
722 pull_request=pull_request_id)
735 c.inline_cnt = len(c.inline_comments)
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 # outdated comments
728 # outdated comments
729 c.outdated_comments = {}
738 c.outdated_cnt = 0
730 c.outdated_cnt = 0
739 if ChangesetCommentsModel.use_outdated_comments(c.pull_request):
731 if ChangesetCommentsModel.use_outdated_comments(c.pull_request):
740 c.outdated_comments = cc_model.get_outdated_comments(
732 c.outdated_comments = cc_model.get_outdated_comments(
@@ -746,11 +738,7 b' class PullrequestsController(BaseRepoCon'
746 c.outdated_cnt += len(comments)
738 c.outdated_cnt += len(comments)
747 if file_name not in c.included_files:
739 if file_name not in c.included_files:
748 c.deleted_files.append(file_name)
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 # this is a hack to properly display links, when creating PR, the
743 # this is a hack to properly display links, when creating PR, the
756 # compare view and others uses different notation, and
744 # compare view and others uses different notation, and
General Comments 0
You need to be logged in to leave comments. Login now