- 06 Dec, 2017 1 commit
-
-
Yorick Peterse authored
This throttles the number of UPDATE queries that can be triggered by calling "touch" on a Note, Issue, or MergeRequest. For Note objects we also take care of updating the associated "noteable" relation in a smarter way than Rails does by default.
-
- 27 Nov, 2017 2 commits
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
Douwe Maan authored
-
- 24 Nov, 2017 1 commit
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 23 Nov, 2017 1 commit
-
-
Sean McGivern authored
Compared to the merge_request_diff association: 1. It's simpler to query. The query uses a foreign key to the merge_request_diffs table, so no ordering is necessary. 2. It's faster for preloading. The merge_request_diff association has to load every diff for the MRs in the set, then discard all but the most recent for each. This association means that Rails can just query for N diffs from N MRs. 3. It's more complicated to update. This is a bidirectional foreign key, so we need to update two tables when adding a diff record. This also means we need to handle this as a special case when importing a GitLab project. There is some juggling with this association in the merge request model: * `MergeRequest#latest_merge_request_diff` is _always_ the latest diff. * `MergeRequest#merge_request_diff` reuses `MergeRequest#latest_merge_request_diff` unless: * Arguments are passed. These are typically to force-reload the association. * It doesn't exist. That means we might be trying to implicitly create a diff. This only seems to happen in specs. * The association is already loaded. This is important for the reasons explained in the comment, which I'll reiterate here: if we a) load a non-latest diff, then b) get its `merge_request`, then c) get that MR's `merge_request_diff`, we should get the diff we loaded in c), even though that's not the latest diff. Basically, `MergeRequest#merge_request_diff` is the latest diff in most cases, but not quite all.
-
- 15 Nov, 2017 1 commit
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 13 Nov, 2017 2 commits
-
-
George Andrinopoulos authored
-
George Andrinopoulos authored
-
- 11 Nov, 2017 2 commits
-
-
George Andrinopoulos authored
-
George Andrinopoulos authored
-
- 09 Nov, 2017 1 commit
-
-
Douwe Maan authored
-
- 06 Nov, 2017 1 commit
-
-
micael.bergeron authored
This method is an ActiveRecord extension and it should behave like one. I expected this to work.
-
- 03 Nov, 2017 1 commit
-
-
Winnie Hellmann authored
-
- 02 Nov, 2017 1 commit
-
-
Douwe Maan authored
-
- 31 Oct, 2017 1 commit
-
-
Eric Eastwood authored
-
- 12 Oct, 2017 1 commit
-
-
Bob Van Landuyt authored
-
- 11 Oct, 2017 1 commit
-
-
Bob Van Landuyt authored
-
- 09 Oct, 2017 3 commits
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 06 Oct, 2017 1 commit
-
-
Toon Claes authored
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo secondary node). But in GitLab CE it also might be useful to have the "read-only" idea around. So port it back to GitLab CE. Also having the principle of read-only in GitLab CE would hopefully lead to less errors introduced, doing write operations when there aren't allowed for read-only calls. Closes gitlab-org/gitlab-ce#37534.
-
- 05 Oct, 2017 3 commits
-
-
Grzegorz Bizon authored
-
Bob Van Landuyt authored
-
Bob Van Landuyt authored
-
- 04 Oct, 2017 8 commits
-
-
Bob Van Landuyt authored
-
Bob Van Landuyt authored
So only methods that are used elsewhere are public.
-
Bob Van Landuyt authored
-
Bob Van Landuyt authored
-
Bob Van Landuyt authored
The possible cases are: - [Array, Array] - [Array, Hash] - [Array, GroupHierarchy] - [Hash,Hash] - [Hash, GroupHierarchy] - [GroupHierarchy, GroupHierarchy]
-
Bob Van Landuyt authored
-
Bob Van Landuyt authored
-
Bob Van Landuyt authored
-
- 06 Sep, 2017 6 commits
-
-
micael.bergeron authored
also fix some code styling issues
-
micael.bergeron authored
-
micael.bergeron authored
- only show in merge-requests - show as a little glyph
-
micael.bergeron authored
-
micael.bergeron authored
this will remove the need make N queries (per-note) at the cost of having to mark notes with an attribute this opens up the possibility for other special roles for notes
-
Sean McGivern authored
-
- 30 Aug, 2017 2 commits
-
-
Hiroyuki Sato authored
-
Hiroyuki Sato authored
-