diff options
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models/pull.go b/models/pull.go index c52c871c..67f103e8 100644 --- a/models/pull.go +++ b/models/pull.go @@ -257,6 +257,7 @@ var patchConflicts = []string{ "patch does not apply", "already exists in working directory", "unrecognized input", + "error:", } // testPatch checks if patch can be merged to base repository without conflit. @@ -280,7 +281,7 @@ func (pr *PullRequest) testPatch() (err error) { return nil } - log.Trace("PullRequest[%d].testPatch(patchPath): %s", pr.ID, patchPath) + log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath) if err := pr.BaseRepo.UpdateLocalCopy(); err != nil { return fmt.Errorf("UpdateLocalCopy: %v", err) @@ -288,7 +289,7 @@ func (pr *PullRequest) testPatch() (err error) { // Checkout base branch. _, stderr, err := process.ExecDir(-1, pr.BaseRepo.LocalCopyPath(), - fmt.Sprintf("PullRequest.Merge(git checkout): %v", pr.BaseRepo.ID), + fmt.Sprintf("PullRequest.Merge (git checkout): %v", pr.BaseRepo.ID), "git", "checkout", pr.BaseBranch) if err != nil { return fmt.Errorf("git checkout: %s", stderr) @@ -296,12 +297,12 @@ func (pr *PullRequest) testPatch() (err error) { pr.Status = PULL_REQUEST_STATUS_CHECKING _, stderr, err = process.ExecDir(-1, pr.BaseRepo.LocalCopyPath(), - fmt.Sprintf("testPatch(git apply --check): %d", pr.BaseRepo.ID), + fmt.Sprintf("testPatch (git apply --check): %d", pr.BaseRepo.ID), "git", "apply", "--check", patchPath) if err != nil { for i := range patchConflicts { if strings.Contains(stderr, patchConflicts[i]) { - log.Trace("PullRequest[%d].testPatch(apply): has conflit", pr.ID) + log.Trace("PullRequest[%d].testPatch (apply): has conflit", pr.ID) fmt.Println(stderr) pr.Status = PULL_REQUEST_STATUS_CONFLICT return nil |