Commit Graph
43 Commits
Author SHA1 Message Date
Rémy Coutable 42c2064a36 Sort line notes used in parallel diff by created_at
Fixes #13464.
2016-02-17 16:31:14 +01:00
Douwe Maan 47afe7ae8f Fewer html_safes 2016-01-30 12:54:19 +01:00
Douwe Maan 677b4db9e6 Mark inline difference between old and new paths when a file is renamed 2016-01-29 19:37:17 +01:00
Douwe Maan 577f2fb47a Save and use actual diff base commit for MR diff highlighting 2016-01-20 18:44:27 +01:00
Douwe Maan 88bd138513 Restore helper 2016-01-20 14:59:14 +01:00
Douwe Maan 701513dcc7 Move parallel diff logic to separate class 2016-01-20 14:53:20 +01:00
Rubén Dávila 6b9c730e91 More refactoring from last code review. #3945
* Use commit objects instead of IDs when generating diffs
* Use proper references when generating MR's source and target
* Update broken specs
2016-01-14 16:47:55 -05:00
Douwe Maan c881627d11 Refactor parallel_diff generation a bit. 2016-01-14 14:52:08 +01:00
Rubén Dávila 0f0af19139 Little refactor for usage of html_safe. #3945 2016-01-13 11:39:15 -05:00
Rubén Dávila c0385488fb Fix broken spec. #3945 2016-01-12 15:12:30 -05:00
Rubén Dávila 80a4c808b1 Make diff_line_content helper return a safe String. #3945 2016-01-12 11:02:16 -05:00
Rubén Dávila 21b602c60a Change strategy to highlight diffs. #3945
Now we apply syntax highlighting to the whole old and new files.
This basically help us to highlight adequately multiline content.
2016-01-07 22:37:01 -05:00
Rubén Dávila 7de90f4b53 Fix broken spec and small refactor. #3945 2015-12-30 18:42:11 -05:00
Rubén Dávila bb96d63153 New implementation for highlighting diff files. #3945
* It is more performant given now we process all the diff file instead
  of processing line by line.
* Multiline comments are highlighted correctly.
2015-12-30 00:52:50 -05:00
Douwe Maan e9e9f537e8 Truncate submodule commit SHAs to 7 characters 2015-12-02 14:53:20 +01:00
Robert Speicher df6bb57921 Merge branch 'compare-first-commit' into 'master'
Correctly set comparison first commit when range includes a merge commit

Fixes #3207.

See merge request !1814
2015-11-17 18:51:40 +00:00
Dmitriy Zaporozhets 5098ad9d3c Merge branch 'remove-code-duplication'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-17 19:17:15 +01:00
Douwe Maan e49190cad9 Don't use params[:view] directly. 2015-11-17 16:33:38 +01:00
Douwe Maan 24cf6865d3 Correctly set comparison first commit when range includes a merge commit 2015-11-17 13:10:01 +01:00
Dmitriy Zaporozhets 437d4c76ec Remove duplication in diff_helper.rb
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-17 10:49:23 +01:00
Dmitriy Zaporozhets c5ec2a23a4 Small UI improvements to merge request page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-06 16:27:18 +01:00
Douwe Maan 8710739e4e Correctly find last known blob for file deleted in MR. 2015-10-20 14:24:02 +02:00
Dmitriy Zaporozhets 4c43d846f2 Fix 500 error on compare page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-01 14:12:43 +02:00
Dmitriy Zaporozhets fe7e97320c Fix bug when removed file was not appearing in merge request diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-30 12:31:23 +02:00
Dmitriy Zaporozhets c2a9e6ea67 Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-03 22:15:21 +02:00
Alex ConnorandJeroen van Baarsen 3c892f3554 Disabled expansion of top/bottom blobs for new file diffs 2015-05-21 09:25:07 +02:00
Alex Lossent affd049dc4 Improve handling of large diffs
Diffs with a large number of changed lines time out (504 HTTP error) or
generate a HTML page that's so heavy web browsers struggle with it.

https://github.com/gitlabhq/gitlabhq/pull/5014 introduced limits on
commit line count so that only a safe portion is rendered. This was
later undone by code refactoring in be5b6db8, e0eb4803 and c741fcab.
This patch re-introduces a safe limit on number of lines.
2015-05-05 18:51:12 +02:00
Stan Hu 72a7febead Fix "Revspec not found" errors when viewing diffs in a forked project with submodules
Closes #1413
2015-04-27 20:42:38 -07:00
Dominik Sander d4fec49abc Fix merge request comments on files with multiple commits
Having a merge request with a comments on a line which is then changed
in a later commit prevented new comments from properly showing up in the
merge request show page.

 * `Note#set_diff` do not use stored the diff when creating a new note
   in merge requests (we can not be sure the diff did not changed since
   the last comment on that line)
 * Do not rely just on `outdated?` of the first note when displaying
   comments of a MR in the discussion tab, but partition the
   active/outdated notes and display them all
 * In the inline changes tab just select the active notes, so an
   outdated note does not prevent an active one from being rendered
 * Just show active comments in the side-by-side changes tab
2015-04-15 18:23:57 +02:00
Stan Hu 546dab6da9 Fix broken side-by-side diff view on merge request page
Closes #1294
2015-03-25 23:39:34 -07:00
Dmitriy Zaporozhets 30ca451fd4 Refactor buttons 2015-03-14 00:29:32 -07:00
Headless 3d2aaa169e show diff in submodules 2015-01-19 17:18:08 +03:00
Dmitriy Zaporozhets 5140a4cd13 Set of UI changes mostly for issue and merge request
* return edit/close buttons to old position (right of title)
* make 'Issue #1' header smaller
* move mr commits to separate tab
* change inline/side diff switcher to buttons from tabs
* make issue sidebar start with dicsussion block

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-25 14:32:49 +02:00
Marin Jankovski 9945e8c424 Move organizing of comments to helper. 2014-09-12 19:51:44 +02:00
Marin Jankovski e84861d510 Remove unecesarry array operations. 2014-09-12 19:41:32 +02:00
Marin Jankovski 5564fe3149 Add comments on the side-by-side diff. 2014-09-12 18:44:53 +02:00
Marin Jankovski 2ff83aa389 Fix typo. 2014-09-09 11:52:16 +02:00
Marin Jankovski ac6a107ac7 Add line code to parallel diff for linking. 2014-09-09 11:36:29 +02:00
Marin Jankovski 9c3935c5b0 Use the new path to the partial, move the diff related methods to the new helper. 2014-09-09 11:10:40 +02:00
Dmitriy Zaporozhets 02e87d9223 optimize show_diff_size_warning?
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 22:12:54 +03:00
Dmitriy Zaporozhets 218219abbd Refactoring inside refactoring. We need to go deeper
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 21:54:52 +03:00
Dmitriy Zaporozhets 531f16beb0 Use new diff parsing logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 16:27:12 +03:00
Dmitriy Zaporozhets be5b6db883 Refactor diff suppress logic and diff views
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-15 18:28:21 +03:00