Commit Graph

27 Commits

Author SHA1 Message Date
Oswaldo Ferreira ed3034bbb7 Allow suggesting single line changes in diffs 2018-12-13 19:17:19 +00:00
Douwe Maan 56834e6bb2 Merge branch 'osw-comment-on-any-line-on-diffs-w-feature-flag' into 'master'
Comment on any expanded diff line on MRs (with feature-flag)

Closes #13950

See merge request gitlab-org/gitlab-ce!22914
2018-11-12 15:36:48 +00:00
Oswaldo Ferreira f9b4130bb7 Comment on any expanded diff line on MRs 2018-11-09 16:56:48 -02:00
Oswaldo Ferreira 198402b38b Revert "Merge branch 'osw-comment-on-any-line-on-diffs' into 'master'"
This reverts commit a82a595728, reversing
changes made to e7df959b8f.
2018-11-07 19:57:26 -02:00
gfyoung 7e6f6e1603 Enable even more frozen string in lib/gitlab
Enables frozens string for the following:

* lib/gitlab/conflict/**/*.rb
* lib/gitlab/cross_project_access/**/*.rb
* lib/gitlab/cycle_analytics/**/*.rb
* lib/gitlab/data_builder/**/*.rb
* lib/gitlab/database/**/*.rb
* lib/gitlab/dependency_linker/**/*.rb
* lib/gitlab/diff/**/*.rb
* lib/gitlab/downtime_check/**/*.rb
* lib/gitlab/email/**/*.rb
* lib/gitlab/etag_caching/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-06 22:47:32 -08:00
Oswaldo Ferreira ec66ef1b74 Comment on any expanded diff line on MRs 2018-11-06 17:39:31 -02:00
Felipe Artur 5bc54ca425 Use a serializer to render diff lines 2018-08-31 15:32:48 -03:00
Sean McGivern 0d01ac5141 Include rich_text in diff cache keys
Previously, this wasn't needed: text was normally set to the highlighted
contents anyway. Now, it is: we store different things in text and rich_text.

This caused https://gitlab.com/gitlab-com/production/issues/439.
2018-08-28 15:28:47 +01:00
Chantal Rollison 81a403f05f Escaped html characters 2018-08-21 07:37:33 -07:00
Jan Provaznik dc551581d0 Use serialize_keys as part of highlight diff cache
This assures that old cache is not used if we change format of
cached data.
2018-07-04 11:34:35 +02:00
Felipe Artur 3e66795ef1 Changes tab VUE refactoring 2018-06-21 12:22:40 +00:00
Oswaldo Ferreira f46739191a Adjust insufficient diff hunks being persisted on NoteDiffFile
This currently causes 500's errors when loading the MR page
(Discussion) in a few scenarios.

We were not considering detailed diff headers such as
"--- a/doc/update/mysql_to_postgresql.md\n+++ b/doc/update/mysql_to_postgresql.md"
to crop the diff. In order to address it, we're now using
Gitlab::Diff::Parser, clean the diffs and builds Gitlab::Diff::Line objects
we can iterate and filter on.
2018-06-05 01:02:30 -03:00
Brian Neel 9770c57fab Re-enable SqlInjection and CommandInjection 2017-08-08 10:50:54 -04:00
Douwe Maan 5e8aca2152 Don't display comment on unchanged line on both sides in parallel diff 2017-06-19 11:50:46 -05:00
Valery Sizov 563c1ca01c Fix: A diff comment on a change at last line of a file shows as two comments in discussion 2017-05-31 18:38:10 +03:00
Douwe Maan f6f6aaf593
Better notification emails for notes and (diff) discussions 2017-04-05 17:44:14 +01:00
mhasbini 985af1a670 take nonewline context into account in diff parser 2017-03-13 22:09:43 +02:00
Sean McGivern 261d47bce9 Fix specs
- Add match line header to expected result for `File#sections`.
- Lowercase CSS colours.
- Remove unused `diff_refs` keyword argument.
- Rename `parent` -> `parent_file`, to be more explicit.
- Skip an iteration when highlighting.
2016-08-12 23:24:46 +03:00
Sean McGivern 7af277f683 Auto-highlight conflict when rich_text is called 2016-08-12 23:24:43 +03:00
Sean McGivern df2ed097b7 Add backend for merge conflicts reading 2016-08-12 23:24:43 +03:00
Paco Guzman cd7c2cb6dd Cache highlighted diff lines for merge requests
Introducing the concept of SafeDiffs which relates 
diffs with UI highlighting.
2016-08-03 07:00:19 +02:00
Douwe Maan a27462a5c6 Extract parts of LegacyDiffNote into DiffOnNote concern and move part of responsibility to other classes 2016-07-06 18:50:59 -04: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
Dmitriy Zaporozhets 0d967bce57
Show additions/deletions stats on merge request diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-01 13:52:08 +02: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 4ef809c77d
Gitlab::Diff classes added
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 16:25:50 +03:00