Web editor: support upload files

This commit is contained in:
Unknwon 2016-08-30 05:07:50 -07:00
parent 7c31f235da
commit 643142acab
24 changed files with 503 additions and 600 deletions

View file

@ -339,9 +339,6 @@ var patchConflicts = []string{
// testPatch checks if patch can be merged to base repository without conflit.
// FIXME: make a mechanism to clean up stable local copies.
func (pr *PullRequest) testPatch() (err error) {
repoWorkingPool.CheckIn(com.ToStr(pr.BaseRepoID))
defer repoWorkingPool.CheckOut(com.ToStr(pr.BaseRepoID))
if pr.BaseRepo == nil {
pr.BaseRepo, err = GetRepositoryByID(pr.BaseRepoID)
if err != nil {
@ -360,6 +357,9 @@ func (pr *PullRequest) testPatch() (err error) {
return nil
}
repoWorkingPool.CheckIn(com.ToStr(pr.BaseRepoID))
defer repoWorkingPool.CheckOut(com.ToStr(pr.BaseRepoID))
log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath)
if err := pr.BaseRepo.UpdateLocalCopyBranch(pr.BaseBranch); err != nil {