@** * 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){
git checkout @branchItemName(pull.fromBranch)
git remote add upstream @getCodeURL(pull.toProject)
git fetch upstream
git rebase upstream/@branchItemName(pull.toBranch)
git add resolved_file
git rebase --continue
git push -f origin @branchItemName(pull.fromBranch)
@pull.fromBranch
@Messages("pullRequest.delete.frombranch.message")
}
@if(canRestoreBranch) {
@pull.fromBranch
@Messages("pullRequest.restore.frombranch.message")
@Messages("pullRequest.restore.branch")
}
}