Commit Graph

25 Commits

Author SHA1 Message Date
Stan Hu 60529e0216 Properly abort a merge when merge conflicts occur
If somehow a user attempted to accept a merge request that had
conflicts (e.g. the "Accept Merge Request" button or the MR itself was
not updated), `MergeService` did not properly detect that a conflict
occurred. It would assume that the MR went through without any issues
and close the MR as though everything was fine. This could cause
data loss if the source branch were removed.

Closes #20425
2016-07-29 11:21:21 -07:00
Rémy Coutable 2cf7f09b1e
Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""
This reverts commit 530f5158e2.

See !4892.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-18 10:16:56 +02:00
Robert Speicher 530f5158e2 Revert "Merge branch '18193-developers-can-merge' into 'master' "
This reverts commit 9ca633eb4c, reversing
changes made to fb229bbf79.
2016-07-13 13:57:30 -05:00
Timothy Andrew 495db09653 Enforce "developers can merge" during `pre-receive`.
1. When a merge request is being merged, save the merge commit SHA in
   the `in_progress_merge_commit_sha` database column.

2. The `pre-receive` hook looks for any locked (in progress) merge
   request with `in_progress_merge_commit_sha` matching the `newrev` it
   is passed.

3. If it finds a matching MR, the merge is legitimate.

4. Update `git_access_spec` to test the behaviour we added here. Also
   refactored this spec a bit to make it easier to add more contexts / conditions.
2016-07-13 13:24:56 +05:30
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
Valery Sizov 926a8ab476 Handle custom Git hook result in GitLab UI 2016-07-04 20:16:55 +03:00
Jeroen Jacobs 7880a300dc Allows MR authors to have the source branch removed when merging the MR 2016-05-20 11:30:03 +02:00
Rubén Dávila f56ee9d3b9 Save merge commit id when MR is merged 2016-02-19 13:14:49 -05:00
Douwe Maan 255445c363 Param should be present, not just truthy 2016-01-14 11:30:28 +01:00
Zeger-Jan van de Weg 0e96d6eb10 Merge branch 'master' into merge-if-green 2015-12-07 10:06:07 +01:00
Robert Speicher a2915aeb66 Rescue StandardError, not Exception 2015-11-24 16:12:25 -05:00
Zeger-Jan van de Weg 2f048df4a4 API support, incorporated feedback 2015-11-18 11:17:41 +01:00
Stan Hu 0ab6ca93aa Add directory feature button
Change "+" icon under "Files" section to have three options:

* Create file
* Upload file
* New directory

Upload file is no longer accessible from the "Create file" page.
Users can now select a target branch in upload file as well.

Closes #2799: Fixes a bug where file modes were overwritten after a commit

Closes https://github.com/gitlabhq/gitlabhq/issues/8253: Existing files
can no longer be overwritten in the "Create file" section.

Closes #2557
2015-10-07 04:22:55 -07:00
Valery Sizov 05fdd12fd9 Improve error message when merging fails 2015-10-01 09:45:47 +03:00
Dmitriy Zaporozhets 9ea37cda3f
merge with support of pre-receive and post-receive hooks
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-14 17:52:49 +02: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 a7fded9b95
Huge refactoring for accepting merge requests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-16 16:03:07 +02:00
Dmitriy Zaporozhets 9d85ea3acf Organize event order execution when update issue or mr 2015-01-25 22:49:05 -08:00
jubianchi 4ffdb83e71 Add action property to merge request hook 2015-01-20 10:50:24 +01:00
Dmitriy Zaporozhets 7eeec5e45a Ooops! Removing debug line :) 2015-01-06 17:00:27 -08:00
Dmitriy Zaporozhets ccdf08d80a Refactor merge request merge service
* Add system note when user merges MR in same way as it closes it
* Remove duplicating code
2015-01-06 16:24:47 -08:00
Dmitriy Zaporozhets f08464c055
Remove author_id_of_changes from app
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-25 14:01:52 +02:00
Dmitriy Zaporozhets 80daf9a777
Use current_user for Notification#merge_mr
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-25 13:47:48 +02:00
Dmitriy Zaporozhets 48f741eed9
MergeRequests services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-24 14:18:32 +02:00