@** * Yobi, Project Hosting SW * * Copyright 2013 NAVER Corp. * http://yobi.io * * @author Keesun Baik, Wansoon Park * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **@ @(project: Project, pull: PullRequest, canDeleteBranch: Boolean, canRestoreBranch: Boolean) @import utils.JodaDateUtil._ @import utils.TemplateHelper._ @import utils.AccessControl._ @import models.enumeration @import scala.collection.JavaConversions._ @getCodeURL(project: Project) = @{ if(ProjectUser.isMember(project.id, UserApp.currentUser().id)){ CodeApp.getURL(project.owner, project.name).replace("://", "://" + UserApp.currentUser.loginId + "@") } else { CodeApp.getURL(project.owner, project.name) } } @if(pull.isMerging == false && !pull.isClosed && !pull.isMerged){ @if(pull.isConflict == false){
@Messages("pullRequest.is.safe")
} else {
@Messages("pullRequest.is.not.safe") @if(UserApp.currentUser().equals(pull.contributor)){
@Messages("pullRequest.resolve.conflict")
  1. @Messages("pullRequest.resolver.step1") git checkout @branchItemName(pull.fromBranch)
  2. @Messages("pullRequest.resolver.step2") git remote add upstream @getCodeURL(pull.toProject)
  3. @Messages("pullRequest.resolver.step3") git fetch upstream
  4. @Messages("pullRequest.resolver.step4") git rebase upstream/@branchItemName(pull.toBranch)
  5. @Messages("pullRequest.resolver.step5")
  6. @Messages("pullRequest.resolver.step6") git add resolved_file
  7. @Messages("pullRequest.resolver.step7") git rebase --continue
  8. @Messages("pullRequest.resolver.step8")
  9. @Messages("pullRequest.resolver.step9") git push -f origin @branchItemName(pull.fromBranch)
  10. @Messages("pullRequest.resolver.step10") @Messages("button.page.refresh")@Messages("pullRequest.resolver.step11")
}
} } @if(pull.isMerging == true){
@Messages("pullRequest.is.merging")
} @if(pull.isMerged){
@pull.receiver.name @{"@"}@pull.receiver.loginId @Html(Messages("pullRequest.merged.the.pullrequest", pull.receiver.name, routes.UserApp.userInfo(pull.receiver.loginId))) @if(UserApp.currentUser().equals(pull.contributor)) { @if(canDeleteBranch) { @pull.fromBranch @Messages("pullRequest.delete.frombranch.message") } @if(canRestoreBranch) { @pull.fromBranch @Messages("pullRequest.restore.frombranch.message") @Messages("pullRequest.restore.branch") } }
}