47 Commits
Author SHA1 Message Date
Douwe Maan 6eb65651a7 We can't call private methods with self. 2016-07-07 14:14:13 -04:00
Douwe Maan 2db75f8deb Make methods private that don't need to be public 2016-07-06 19:29:14 -04:00
Douwe Maan d9c75aec3a Use stored start and head for MR diff without whitespace 2016-07-06 18:51:02 -04:00
Douwe Maan 0a5e387284 On MRs being imported, commits aren't available yet 2016-07-06 18:51:02 -04:00
Douwe Maan 6ce25e7b4c Rename MergeRequest methods that return commits or shas to be more clear and consistent 2016-07-06 18:50:58 -04:00
Douwe Maan 18a5bb0520 Store diff head and start commit shas on MR diffs 2016-07-06 18:49:03 -04:00
Douwe Maan 3286dd7a1d Don't garbage collect commits that have related DB records like comments 2016-07-04 00:11:33 -04:00
Paco Guzman f525b535a5 Use update_columns to by_pass all the dirty code on active_record
We think this is valid because we’re just storing new data that always will be valid
2016-06-29 13:13:54 +02:00
James Lopez ad68bc63b5 Merge branches 'feature/project-export' and 'feature/project-import' of gitlab.com:gitlab-org/gitlab-ce into feature/project-import
# Conflicts:
#	app/models/project.rb
#	db/schema.rb
#	lib/gitlab/import_export/import_export_reader.rb
2016-06-13 12:43:25 +02:00
James Lopez 7c8359b744 started refactoring some stuff based on MR feedback 2016-06-01 18:03:51 +02:00
Sean McGivern 27fdd3fe50 Maintain commit order in MRs
`Gitlab::Git::Compare` will already have the correct order; sorting in
Ruby can only ruin that. (The correct order being the same as `git log`
- reverse chronological while maintaining the commit graph.)

As an example, imagine a branch where someone has their system clock set
wrong for some of the commits. Not only will those commits be in the
wrong order - which is maybe reasonable - but sorting in Ruby can also
put commits with the same timestamp out of order, as Ruby's sorting
isn't stable.
2016-05-18 17:14:55 +01:00
Douglas Barbosa Alexandre 7e1f14e215 Preserve commits/diff/comments for PRs that were merged on GitHub 2016-05-13 17:55:42 -05:00
James Lopez 47cd14b560 Merge branch 'feature/project-export' of gitlab.com:gitlab-org/gitlab-ce into feature/project-import 2016-05-09 18:01:06 +02:00
Jeroen van Baarsen f1479b56b7 Remove the annotate gem and delete old annotations
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
2016-05-09 18:00:28 +02:00
Zeger-Jan van de Weg 47da013cf8 Annotate the models 2016-05-06 08:27:46 +02:00
James Lopez 7614d230a2 fix conflicts 2016-04-21 17:28:56 +02:00
Rémy Coutable 6970612bcc Get rid of more requires, which causes warnings when code is reloaded
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-19 11:48:10 +02:00
James Lopez da60baf2a5 fixing more importing issues 2016-04-12 10:36:18 +02:00
Jacob Vosmaer 97093a5298 Show at most 100 commits in the web UI
When rendering 1 commit takes over 5ms (on my laptop: around 9ms), it
saves seconds in rendering time to show 100 instead of 500 commits.
2016-03-04 15:17:12 +01:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Douwe Maan 5cce1278ad Correctly determine MR diff base when MR has merge conflicts 2016-01-27 17:23:59 +01:00
Douwe Maan 577f2fb47a Save and use actual diff base commit for MR diff highlighting 2016-01-20 18:44:27 +01:00
Minsik Yoonand윤민식 3d0efa8e0a Add ignore white space option in merge request diff
fix this issue(https://gitlab.com/gitlab-org/gitlab-ce/issues/1393).

Add ignore whitespace optoin to Commits Compare view
2015-11-13 16:53:53 +09:00
Douwe Maan 8710739e4e Correctly find last known blob for file deleted in MR. 2015-10-20 14:24:02 +02:00
Stan Hu 2611d9f63c Add a system note and update relevant merge requests when a branch is deleted or re-added
If a branch is deleted with an open merge request, amended offline, and then pushed again,
GitLab doesn't bother to update the merge request even though the last commit ID and/or
code may have changed. This MR ensures that each push will update any relevant merge
requests and adds a system note if this happens as well.

Closes #2926
2015-10-15 23:54:13 -07:00
Guilherme Garnier 2b075f16c7 Fix rubocop warnings in app 2015-10-03 00:56:37 -05:00
Stan Hu a44ca15c1d Fix Error 500 in creating merge requests with > 1000 diffs
Closes #2692
2015-09-25 02:40:34 -07:00
Dmitriy Zaporozhets 3e259ea8bc Revert "Merge branch 'revert-satellites' into 'master' "
This reverts commit 5daf44b7c8, reversing
changes made to 2f706fbd23.
2015-08-11 14:33:31 +02:00
Dmitriy Zaporozhets 9f10943c1a Revert "Merge branch 'drop-satellites'"
This reverts commit 957e849f41, reversing
changes made to 6b9dbe9f5a.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-11 10:28:42 +02:00
Dmitriy Zaporozhets 84727fba96 Revert "Merge branch 'improve-merge-requests' into 'master' "
This reverts commit 4773f38e28, reversing
changes made to 0d5d80b735.
2015-08-11 10:26:19 +02:00
Dmitriy Zaporozhets 86bccb71a1 Create ref for every merge request. Add documentation for fetch merge requests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-07 12:54:58 +02:00
Dmitriy Zaporozhets 971e47520f Increase COMMITS_SAFE_SIZE to reasonable size in compare to diff limits. Fix reload with full diff link
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-16 16:32:43 +02:00
Dmitriy Zaporozhets 26f5d6047d Refactor compare and fetch logic 2015-07-15 17:28:09 +02:00
Dmitriy Zaporozhets cb6f34e367 Implement update of ref when merge request code is reloaded 2015-07-15 16:52:50 +02:00
Dmitriy Zaporozhets 2a6f522cac Implement merge from forks without satellites 2015-07-15 16:45:50 +02:00
Douwe Maan 84a1590252 Let commit model know about its project. 2015-04-24 12:29:36 +02:00
Dmitriy Zaporozhets 62ed1c537e Explicitly define ordering in models using default_scope 2015-02-05 14:20:55 -08:00
Dmitriy Zaporozhets 0189be0831 Use short_id instead of [0..N] for short version of commit sha
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-10 15:39:48 +03:00
Dmitriy Zaporozhets 92deb451da Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-25 12:25:02 +03:00
Dmitriy Zaporozhets 098ee55e3c Use CompareService in collecting diff when create MR
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-29 12:21:03 +03:00
Dmitriy Zaporozhets cb74c014ea Key strong params
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 17:00:05 +03:00
Dmitriy Zaporozhets 4fea8afc4b Add CompareAction class for collecting commits and diffs using satellites
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-07 16:14:24 +03:00
Dmitriy Zaporozhets 36f861f1b1 Re-annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-09 15:05:03 +03:00
tsl0922 5c3972ae1e remove dead code: broken_diffs 2014-02-27 14:58:27 +08:00
Dmitriy Zaporozhets 0bcabdaf83 Use gitlab_git 5.4.0 without BROKEN_DIFF constant
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-12 12:54:49 +02:00
Dmitriy Zaporozhets 39a86963e9 Set mr_diff state to collected if diff is ok
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-22 15:30:14 +02:00
Dmitriy Zaporozhets d9be420ee6 MergeRequestDiff model responsoible for storing commits/diff info
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-22 15:19:02 +02:00