summaryrefslogtreecommitdiff
path: root/lib/gitlab/conflict/file.rb
Commit message (Collapse)AuthorAgeFilesLines
* Move line code generation into Gitlab::Gitconflict-resolution-refactorAlejandro Rodríguez2017-10-121-12/+1
| | | | Having a distinct class just for that was a bit overkill
* Create a Gitlab::Git submodule for conlict-related filesAlejandro Rodríguez2017-10-121-2/+5
| | | | Rename classes to (hopefully) clearer names while we're doing that.
* Refactor conflict resolution to contain git ops within Gitlab::GitAlejandro Rodríguez2017-10-121-65/+19
| | | | | This prepares the codebase for a Gitaly migration. See https://gitlab.com/gitlab-org/gitaly/issues/553
* Move Gitlab::Diff::LineCode to module Gitlab::GitAlejandro Rodríguez2017-10-121-1/+1
|
* Include new URL helpers retroactively into includers of Gitlab::Routingdm-fix-project-path-helpers-productionDouwe Maan2017-07-071-1/+1
|
* Create and use project path helpers that only need a project, no namespaceDouwe Maan2017-07-051-8/+5
|
* Enable and autocorrect the CustomErrorClass copSean McGivern2017-03-011-2/+1
|
* Fix code for copsDouwe Maan2017-02-231-5/+6
|
* Enable Style/ConditionalAssignmentDouwe Maan2017-02-231-3/+3
|
* Add blob_ace_mode to conflict content responseSean McGivern2016-10-131-0/+5
|
* Simplify conflict file JSON creationSean McGivern2016-10-131-7/+15
|
* Allow setting content for resolutionsSean McGivern2016-10-131-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | When reading conflicts: 1. Add a `type` field. `text` works as before, and has `sections`; `text-editor` is a file with ambiguous conflict markers that can only be resolved in an editor. 2. Add a `content_path` field pointing to a JSON representation of the file's content for a single file. 3. Hitting `content_path` returns a similar datastructure to the `file`, but without the `content_path` and `sections` fields, and with a `content` field containing the full contents of the file (with conflict markers). When writing conflicts: 1. Instead of `sections` being at the top level, they are now in a `files` array. This matches the read format better. 2. The `files` array contains file hashes, each of which must contain: a. `new_path` b. `old_path` c. EITHER `sections` (which works as before) or `content` (with the full content of the resolved file).
* Handle case where conflicts aren't on disk yetSean McGivern2016-08-251-0/+11
|
* Fix bug where conflict view would have one too many context sectionsDouwe Maan2016-08-121-2/+4
|
* Find match line headers by backtrackingSean McGivern2016-08-121-11/+24
| | | | | This is more efficient for large files than performing a regex match on every single line.
* Move resolving code to ResolveServiceSean McGivern2016-08-121-8/+0
|
* Clarify Conflict::File#sections methodSean McGivern2016-08-121-3/+19
|
* Don't allow resolving invalid conflictsSean McGivern2016-08-121-2/+2
| | | | | | | | | | An MR can only be resolved in the UI if: - It has conflicts. - It has valid diff_refs (in other words, it supports new diff notes). - It has no conflicts with one side missing. - It has no conflicts in binary files. - It has no conflicts in files too large to display. - It has no conflicts containing invalid conflict markers.
* Add blob_icon to conflict file JSONSean McGivern2016-08-121-2/+4
|
* Add blob_path to conflict file JSONSean McGivern2016-08-121-3/+9
|
* Use same resolution format on FE and BESean McGivern2016-08-121-2/+2
|
* Fix specsSean McGivern2016-08-121-11/+7
| | | | | | | | - 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.
* Fix match line headers at start / end of fileSean McGivern2016-08-121-16/+33
|
* Highlight files based on merged fileSean McGivern2016-08-121-2/+5
|
* Add match line headersSean McGivern2016-08-121-1/+8
|
* Handle conflict resolution errors in controllerSean McGivern2016-08-121-5/+5
|
* Auto-highlight conflict when rich_text is calledSean McGivern2016-08-121-8/+5
|
* Allow resolving conflicts in MR controllerSean McGivern2016-08-121-1/+43
|
* Handle multiple merge conflict files in collectionSean McGivern2016-08-121-8/+10
|
* Add backend for merge conflicts readingSean McGivern2016-08-121-0/+91