From 9b5e79e4469af20f7163f1d414634d9bdf8023dc Mon Sep 17 00:00:00 2001 From: Keesun Baik Date: Wed, 16 Apr 2014 15:33:47 +0900 Subject: [PATCH 01/23] PullRequest: delete merging branch --- app/playRepository/GitRepository.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/playRepository/GitRepository.java b/app/playRepository/GitRepository.java index e872402b3..369f1e85f 100644 --- a/app/playRepository/GitRepository.java +++ b/app/playRepository/GitRepository.java @@ -1245,6 +1245,10 @@ public static void cloneAndFetch(PullRequest pullRequest, AfterCloneAndFetchOper // Operation 실행. (현재 위치는 mergingBranch) CloneAndFetch cloneAndFetch = new CloneAndFetch(cloneRepository, destToBranchName, destFromBranchName, mergingBranch); operation.invoke(cloneAndFetch); + + // 코드 받을 브랜치로 이동하고 mergingBranch 삭제 + new Git(cloneRepository).checkout().setName(destToBranchName).call(); + new Git(cloneRepository).branchDelete().setForce(true).setBranchNames(mergingBranch).call(); } } catch (GitAPIException e) { throw new IllegalStateException(e); From 0756ab21180745893d53066ee2dd9cd141557e31 Mon Sep 17 00:00:00 2001 From: Jihan Kim Date: Wed, 16 Apr 2014 16:41:54 +0900 Subject: [PATCH 02/23] Review: nEndColumn cannot be exceeded nNodeLength --- public/javascripts/common/yobi.CodeCommentBlock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/common/yobi.CodeCommentBlock.js b/public/javascripts/common/yobi.CodeCommentBlock.js index 4e6c2130a..79f2ee705 100644 --- a/public/javascripts/common/yobi.CodeCommentBlock.js +++ b/public/javascripts/common/yobi.CodeCommentBlock.js @@ -288,7 +288,7 @@ yobi.CodeCommentBlock = (function(){ } oRange.setStart(welRowNode, nStartColumn); - oRange.setEnd(welRowNode, nEndColumn); + oRange.setEnd(welRowNode, Math.min(nEndColumn, nNodeLength)); oRange.surroundContents(elBlock); }); From 20d22c4aa2ad79b836d797e8a7984311a0159d61 Mon Sep 17 00:00:00 2001 From: Jihan Kim Date: Wed, 16 Apr 2014 15:40:17 +0900 Subject: [PATCH 03/23] Review: mouseover thread shows block in IE,FF --- public/javascripts/common/yobi.CodeCommentBox.js | 3 ++- public/javascripts/service/yobi.code.Diff.js | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/public/javascripts/common/yobi.CodeCommentBox.js b/public/javascripts/common/yobi.CodeCommentBox.js index 14656c4d8..86e3f80f5 100644 --- a/public/javascripts/common/yobi.CodeCommentBox.js +++ b/public/javascripts/common/yobi.CodeCommentBox.js @@ -263,7 +263,8 @@ yobi.CodeCommentBox = (function(){ * @private */ function _isVisible(){ - return (htElement.welCommentWrap.css("display") === "block"); + return (htElement.welCommentWrap && + htElement.welCommentWrap.css("display") === "block"); } /** diff --git a/public/javascripts/service/yobi.code.Diff.js b/public/javascripts/service/yobi.code.Diff.js index 638c029d5..dddeb93ff 100644 --- a/public/javascripts/service/yobi.code.Diff.js +++ b/public/javascripts/service/yobi.code.Diff.js @@ -546,7 +546,7 @@ */ function _onMouseOverCodeCommentThread(weEvt){ // only no mouse button clicked - if(weEvt.which !== 0){ + if(_doesMouseButtonPressed(weEvt)){ return; } @@ -563,6 +563,17 @@ yobi.CodeCommentBlock.block(htBlockInfo); } + /** + * Returns whether any mouse button has been pressed. + * + * @param weEvt + * @returns {boolean} + * @private + */ + function _doesMouseButtonPressed(weEvt){ + return (typeof weEvt.buttons !== "undefined") ? (weEvt.buttons !== 0) : (weEvt.which !== 0); + } + /** * On MouseLeave event fired from CodeCommentThread * @private From 35d8449618dbc03af2a1fd75551b5b3721888448 Mon Sep 17 00:00:00 2001 From: Keesun Baik Date: Wed, 16 Apr 2014 18:09:29 +0900 Subject: [PATCH 04/23] Projects: increased the number of recently visited projects to 20 --- app/views/index/myProjectList.scala.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/index/myProjectList.scala.html b/app/views/index/myProjectList.scala.html index f1dad410d..cad434379 100644 --- a/app/views/index/myProjectList.scala.html +++ b/app/views/index/myProjectList.scala.html @@ -14,7 +14,7 @@ } } -@defining(currentUser.getVisitedProjects(10)){ visitedProjects => +@defining(currentUser.getVisitedProjects(20)){ visitedProjects =>
    @for(visited <- visitedProjects){
  • From 789ccc6936c522c0258d5d2548cd3a619b0702cb Mon Sep 17 00:00:00 2001 From: Jihan Kim Date: Wed, 16 Apr 2014 18:29:20 +0900 Subject: [PATCH 05/23] PullRequest: change help styles in conflict state --- app/assets/stylesheets/less/_page.less | 22 ++++++++++++++++++ app/views/git/partial_state.scala.html | 32 ++++++++++++++------------ 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/less/_page.less b/app/assets/stylesheets/less/_page.less index de042f226..4d96619ac 100644 --- a/app/assets/stylesheets/less/_page.less +++ b/app/assets/stylesheets/less/_page.less @@ -5440,3 +5440,25 @@ div.diff-body[data-outdated="true"] tr:hover .icon-comment { .margin-right-15 { margin-right: 15px; } + +.howto-resolve-conflict { + .help { + padding:10px; + font-size:12px; + background:#fefefe; + .border-radius(2px); + + ol { + margin-left: 30px; + + code { + display:block; + font-weight:normal; + padding:5px; margin:5px 0; + } + + .ybtn { margin:0 5px; font-weight:normal !important; } + } + } +} + diff --git a/app/views/git/partial_state.scala.html b/app/views/git/partial_state.scala.html index 0d413b9a0..3180ce732 100644 --- a/app/views/git/partial_state.scala.html +++ b/app/views/git/partial_state.scala.html @@ -45,7 +45,7 @@ @Messages("pullRequest.is.not.safe")
    - @Messages("pullRequest.conflict.files") +
    @Messages("pullRequest.conflict.files")
      @for(file <- pull.getConflictFiles) {
    • @file
    • @@ -54,20 +54,22 @@
    @if(UserApp.currentUser().equals(pull.contributor)){ -
    - @Messages("pullRequest.resolve.conflict") -
      -
    1. @Messages("pullRequest.resolver.step1") git checkout @branchItemName(pull.fromBranch)
    2. -
    3. @Messages("pullRequest.resolver.step2") git remote add upstream @getCodeURL(pull.toProject)
    4. -
    5. @Messages("pullRequest.resolver.step3") git fetch upstream
    6. -
    7. @Messages("pullRequest.resolver.step4") git rebase upstream/@branchItemName(pull.toBranch)
    8. -
    9. @Messages("pullRequest.resolver.step5")
    10. -
    11. @Messages("pullRequest.resolver.step6") git add resolved_file
    12. -
    13. @Messages("pullRequest.resolver.step7") git rebase --continue
    14. -
    15. @Messages("pullRequest.resolver.step8")
    16. -
    17. @Messages("pullRequest.resolver.step9") git push -f origin @branchItemName(pull.fromBranch)
    18. -
    19. @Messages("pullRequest.resolver.step10") @Messages("button.page.refresh")@Messages("pullRequest.resolver.step11")
    20. -
    +
    +
    @Messages("pullRequest.resolve.conflict")
    +
    +
      +
    1. @Messages("pullRequest.resolver.step1") git checkout @branchItemName(pull.fromBranch)
    2. +
    3. @Messages("pullRequest.resolver.step2") git remote add upstream @getCodeURL(pull.toProject)
    4. +
    5. @Messages("pullRequest.resolver.step3") git fetch upstream
    6. +
    7. @Messages("pullRequest.resolver.step4") git rebase upstream/@branchItemName(pull.toBranch)
    8. +
    9. @Messages("pullRequest.resolver.step5")
    10. +
    11. @Messages("pullRequest.resolver.step6") git add resolved_file
    12. +
    13. @Messages("pullRequest.resolver.step7") git rebase --continue
    14. +
    15. @Messages("pullRequest.resolver.step8")
    16. +
    17. @Messages("pullRequest.resolver.step9") git push -f origin @branchItemName(pull.fromBranch)
    18. +
    19. @Messages("pullRequest.resolver.step10") @Messages("button.page.refresh")@Messages("pullRequest.resolver.step11")
    20. +
    +
    }
    From 7a81f0c46d8f5b451e5c48f05973cd93f178a160 Mon Sep 17 00:00:00 2001 From: Keesun Baik Date: Wed, 16 Apr 2014 18:36:21 +0900 Subject: [PATCH 06/23] Projects: sort projects by name asc --- app/views/index/myProjectList.scala.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/index/myProjectList.scala.html b/app/views/index/myProjectList.scala.html index cad434379..fa69485c7 100644 --- a/app/views/index/myProjectList.scala.html +++ b/app/views/index/myProjectList.scala.html @@ -27,7 +27,7 @@
} -@orderString = @{"createdDate DESC"} +@orderString = @{"name ASC"} @displayProjects("watching", currentUser.getWatchingProjects(orderString)) @displayProjects("createdByMe", Project.findProjectsCreatedByUser(currentUser.loginId, orderString)) @displayProjects("joinmember", Project.findProjectsJustMemberAndNotOwner(currentUser, orderString)) From 0185ef6c9d055d08ae40d2826a76e6487fac1477 Mon Sep 17 00:00:00 2001 From: insanehong Date: Wed, 16 Apr 2014 19:07:41 +0900 Subject: [PATCH 07/23] Attachment: Fix attachment bug --- public/javascripts/common/yobi.Attachments.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/common/yobi.Attachments.js b/public/javascripts/common/yobi.Attachments.js index 417ced3c2..00bb0c60e 100755 --- a/public/javascripts/common/yobi.Attachments.js +++ b/public/javascripts/common/yobi.Attachments.js @@ -75,8 +75,8 @@ yobi.Attachments = function(htOptions) { // welContainer htElements.welContainer = $(htOptions.elContainer); htElements.welContainer.data("isYobiAttachment", true); - htVar.sResourceId = htVar.sResourceId || htElements.welContainer.attr('data-resourceId'); - htVar.sResourceType = htVar.sResourceType || htElements.welContainer.attr('data-resourceType'); + htVar.sResourceId = htVar.sResourceId || htElements.welContainer.data('resourceId'); + htVar.sResourceType = htVar.sResourceType || htElements.welContainer.data('resourceType'); // welTextarea (Optional) htElements.welTextarea = $(htOptions.elTextarea); From a8a14af7a0e5fa7437b1f6cdd96428c4b593ac71 Mon Sep 17 00:00:00 2001 From: Keesun Baik Date: Wed, 16 Apr 2014 19:11:01 +0900 Subject: [PATCH 08/23] Date: fixed to use agoOrDateString --- app/views/board/partial_comments.scala.html | 2 +- .../code/partial_nonrange_codecomment_thread.scala.html | 2 +- app/views/code/svnDiff.scala.html | 4 ++-- app/views/git/partial_diff.scala.html | 2 +- app/views/git/partial_pull_request_event.scala.html | 2 +- app/views/git/viewChanges.scala.html | 2 +- app/views/index/partial_notifications.scala.html | 2 +- app/views/issue/my_partial_list.scala.html | 2 +- app/views/issue/partial_comments.scala.html | 4 ++-- app/views/organization/view.scala.html | 2 +- app/views/partial_comment_thread.scala.html | 2 +- app/views/project/home.scala.html | 4 ++-- app/views/project/list.scala.html | 2 +- app/views/project/partial_dashboard_pullrequests.scala.html | 5 +++-- app/views/project/partial_history.scala.html | 2 +- app/views/reviewthread/partial_list.scala.html | 2 +- app/views/site/issueList.scala.html | 2 +- app/views/site/postList.scala.html | 2 +- app/views/user/partial_issues.scala.html | 2 +- app/views/user/partial_postings.scala.html | 2 +- app/views/user/partial_pullRequests.scala.html | 2 +- 21 files changed, 26 insertions(+), 25 deletions(-) diff --git a/app/views/board/partial_comments.scala.html b/app/views/board/partial_comments.scala.html index 52af27173..d7ca43d39 100644 --- a/app/views/board/partial_comments.scala.html +++ b/app/views/board/partial_comments.scala.html @@ -48,7 +48,7 @@ @comment.authorLoginId - @utils.TemplateHelper.agoString(comment.ago()) + @utils.TemplateHelper.agoOrDateString(comment.createdDate) @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.UPDATE)) { diff --git a/app/views/code/partial_nonrange_codecomment_thread.scala.html b/app/views/code/partial_nonrange_codecomment_thread.scala.html index 8ade6766f..dbd208f09 100644 --- a/app/views/code/partial_nonrange_codecomment_thread.scala.html +++ b/app/views/code/partial_nonrange_codecomment_thread.scala.html @@ -43,7 +43,7 @@ @comment.author.loginId - @utils.TemplateHelper.agoString(utils.JodaDateUtil.ago(comment.createdDate)) + @utils.TemplateHelper.agoOrDateString(comment.createdDate) @if(utils.AccessControl.isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ diff --git a/app/views/code/svnDiff.scala.html b/app/views/code/svnDiff.scala.html index f8540ee77..9e237c0d1 100644 --- a/app/views/code/svnDiff.scala.html +++ b/app/views/code/svnDiff.scala.html @@ -59,7 +59,7 @@ } } - @agoString(JodaDateUtil.ago(commit.getAuthorDate)) + @agoOrDateString(commit.getAuthorDate) @{"@"}@commit.getId @if(comments.size > 0) { @@ -107,7 +107,7 @@

- @agoString(JodaDateUtil.ago(comment.createdDate)) + @agoOrDateString(comment.createdDate) @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ diff --git a/app/views/git/partial_diff.scala.html b/app/views/git/partial_diff.scala.html index d4c81c900..1a3af0ca2 100644 --- a/app/views/git/partial_diff.scala.html +++ b/app/views/git/partial_diff.scala.html @@ -91,7 +91,7 @@

@Messages("pullRequest.is.not.safe")
} - @agoString(JodaDateUtil.ago(commit.getAuthorDate)) + @agoOrDateString(commit.getAuthorDate) @defining(User.find.where.eq("email", commit.getAuthorEmail).findUnique) { user => diff --git a/app/views/git/partial_pull_request_event.scala.html b/app/views/git/partial_pull_request_event.scala.html index 98c2e50e1..4c872dbbf 100644 --- a/app/views/git/partial_pull_request_event.scala.html +++ b/app/views/git/partial_pull_request_event.scala.html @@ -120,7 +120,7 @@ @author.name @commit.authorEmail -
@utils.TemplateHelper.agoString(ago(commit.authorDate))
+
@utils.TemplateHelper.agoOrDateString(commit.authorDate)
} else { } diff --git a/app/views/git/viewChanges.scala.html b/app/views/git/viewChanges.scala.html index b9bcb40e4..c251412a5 100644 --- a/app/views/git/viewChanges.scala.html +++ b/app/views/git/viewChanges.scala.html @@ -91,7 +91,7 @@ } } - @agoString(JodaDateUtil.ago(commit.getAuthorDate)) + @agoOrDateString(commit.getAuthorDate)

@commit.getMessage
diff --git a/app/views/index/partial_notifications.scala.html b/app/views/index/partial_notifications.scala.html index e45b76d86..fe5f3452c 100644 --- a/app/views/index/partial_notifications.scala.html +++ b/app/views/index/partial_notifications.scala.html @@ -78,7 +78,7 @@
@user.name @@@user.loginId - @agoString(JodaDateUtil.ago(noti.created)) + @agoOrDateString(noti.created)
diff --git a/app/views/issue/my_partial_list.scala.html b/app/views/issue/my_partial_list.scala.html index 70f01a3f3..b1bef5781 100644 --- a/app/views/issue/my_partial_list.scala.html +++ b/app/views/issue/my_partial_list.scala.html @@ -39,7 +39,7 @@ } - @agoString(issue.ago) + @agoOrDateString(issue.createdDate) @if(issue.comments.size()>0){ diff --git a/app/views/issue/partial_comments.scala.html b/app/views/issue/partial_comments.scala.html index ff58e95e4..31a428c97 100644 --- a/app/views/issue/partial_comments.scala.html +++ b/app/views/issue/partial_comments.scala.html @@ -84,7 +84,7 @@ @comment.authorLoginId
- @utils.TemplateHelper.agoString(comment.ago()) + @utils.TemplateHelper.agoOrDateString(comment.createdDate) @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.UPDATE)) { @@ -133,7 +133,7 @@ } } } - @utils.TemplateHelper.agoString(JodaDateUtil.ago(event.getDate())) + @utils.TemplateHelper.agoOrDateString(event.getDate()) } } diff --git a/app/views/organization/view.scala.html b/app/views/organization/view.scala.html index 2fe9f641a..d66f9e41f 100644 --- a/app/views/organization/view.scala.html +++ b/app/views/organization/view.scala.html @@ -55,7 +55,7 @@

@org.descr

@project.overview

by @project.owner - at @agoString(JodaDateUtil.ago(project.createdDate)) @if(project.lastPushedDateAgo() != null) {, @Messages("project.codeUpdate") @agoString(project.lastPushedDateAgo())} + at @agoOrDateString(project.createdDate) @if(project.lastPushedDateAgo() != null) {, @Messages("project.codeUpdate") @agoOrDateString(project.lastPushedDate)}

diff --git a/app/views/partial_comment_thread.scala.html b/app/views/partial_comment_thread.scala.html index d787b9b36..86afa0375 100644 --- a/app/views/partial_comment_thread.scala.html +++ b/app/views/partial_comment_thread.scala.html @@ -53,7 +53,7 @@ @comment.author.loginId
- @utils.TemplateHelper.agoString(utils.JodaDateUtil.ago(comment.createdDate)) + @utils.TemplateHelper.agoOrDateString(comment.createdDate) @if(utils.AccessControl.isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ diff --git a/app/views/project/home.scala.html b/app/views/project/home.scala.html index 41b5dbc62..30400c3d1 100644 --- a/app/views/project/home.scala.html +++ b/app/views/project/home.scala.html @@ -48,8 +48,8 @@

@if(StringUtils.isEmpty(project.overview)) {@ "history"))"> @Messages("project.history.recent") - @defining(JodaDateUtil.ago(histories.get(0).getWhen)){ latestHistoryDuration => - @agoString(latestHistoryDuration) + @defining(histories.get(0).getWhen){ when => + @agoOrDateString(when) } diff --git a/app/views/project/list.scala.html b/app/views/project/list.scala.html index 217cd2e80..8282de50b 100644 --- a/app/views/project/list.scala.html +++ b/app/views/project/list.scala.html @@ -50,7 +50,7 @@

@Messages("title.projectList")

@project.overview

by @project.owner - at @agoString(JodaDateUtil.ago(project.createdDate)) @if(project.lastPushedDateAgo() != null) {, @Messages("project.codeUpdate") @agoString(project.lastPushedDateAgo())} + at @agoOrDateString(project.createdDate) @if(project.lastPushedDateAgo() != null) {, @Messages("project.codeUpdate") @agoOrDateString(project.lastPushedDate)}

diff --git a/app/views/project/partial_dashboard_pullrequests.scala.html b/app/views/project/partial_dashboard_pullrequests.scala.html index 02b764d45..90cf6a9e7 100644 --- a/app/views/project/partial_dashboard_pullrequests.scala.html +++ b/app/views/project/partial_dashboard_pullrequests.scala.html @@ -21,6 +21,7 @@ @(project:Project) @import utils.TemplateHelper._ +@import utils.JodaDateUtil @defining(models.PullRequest.findRecentlyReceivedOpen(project, 5)) { pullRequests => @if(pullRequests.size > 0){ @@ -34,8 +35,8 @@ @Messages("pullRequest.reviewed") @pullRequest.reviewers.size } -
- @agoString(pullRequest.createdAgo()) +
+ @agoOrDateString(pullRequest.created)
} diff --git a/app/views/project/partial_history.scala.html b/app/views/project/partial_history.scala.html index 1af125cc2..22e205e7e 100644 --- a/app/views/project/partial_history.scala.html +++ b/app/views/project/partial_history.scala.html @@ -62,7 +62,7 @@

- @agoString(JodaDateUtil.ago(history.getWhen)) + @agoOrDateString(history.getWhen)

diff --git a/app/views/reviewthread/partial_list.scala.html b/app/views/reviewthread/partial_list.scala.html index 712c1b4a1..f6fc77d53 100644 --- a/app/views/reviewthread/partial_list.scala.html +++ b/app/views/reviewthread/partial_list.scala.html @@ -52,7 +52,7 @@ @Messages("issue.noAuthor") } - @agoString(JodaDateUtil.ago(thread.createdDate)) + @agoOrDateString(thread.createdDate) @defining(thread.reviewComments.size()-1) { numberOfComments => @if(numberOfComments > 0) { diff --git a/app/views/site/issueList.scala.html b/app/views/site/issueList.scala.html index 3dc9115d3..4bc12d1a1 100644 --- a/app/views/site/issueList.scala.html +++ b/app/views/site/issueList.scala.html @@ -43,7 +43,7 @@

@Messages("site.sidebar.issueList")

@user.name