diff options
author | Unknwon <u@gogs.io> | 2015-10-25 18:35:27 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-10-25 18:35:27 -0400 |
commit | 87c3c8172a8596d903e9c6ab6c9619e84dcf6413 (patch) | |
tree | 1b1c59837eadef211730386dbf1f52a737b9cb28 | |
parent | 022820103d622dda74aa1c619ca46838a14b762a (diff) | |
download | gitea-87c3c8172a8596d903e9c6ab6c9619e84dcf6413.tar.gz gitea-87c3c8172a8596d903e9c6ab6c9619e84dcf6413.zip |
#1711 try to indicate sqlite session issue when merge
l--------- | conf/gitignore/Clojure.gitignore | 1 | ||||
l--------- | conf/gitignore/Fortran.gitignore | 1 | ||||
-rw-r--r-- | models/pull.go | 12 |
3 files changed, 8 insertions, 6 deletions
diff --git a/conf/gitignore/Clojure.gitignore b/conf/gitignore/Clojure.gitignore deleted file mode 120000 index 7657a270c4..0000000000 --- a/conf/gitignore/Clojure.gitignore +++ /dev/null @@ -1 +0,0 @@ -Leiningen.gitignore
\ No newline at end of file diff --git a/conf/gitignore/Fortran.gitignore b/conf/gitignore/Fortran.gitignore deleted file mode 120000 index 5daba98a3e..0000000000 --- a/conf/gitignore/Fortran.gitignore +++ /dev/null @@ -1 +0,0 @@ -C++.gitignore
\ No newline at end of file diff --git a/models/pull.go b/models/pull.go index 7ef0901cc7..fc8a70345e 100644 --- a/models/pull.go +++ b/models/pull.go @@ -73,14 +73,18 @@ func (pr *PullRequest) AfterSet(colName string, _ xorm.Cell) { } } -func (pr *PullRequest) GetHeadRepo() (err error) { - pr.HeadRepo, err = GetRepositoryByID(pr.HeadRepoID) +func (pr *PullRequest) getHeadRepo(e Engine) (err error) { + pr.HeadRepo, err = getRepositoryByID(e, pr.HeadRepoID) if err != nil && !IsErrRepoNotExist(err) { return fmt.Errorf("GetRepositoryByID (head): %v", err) } return nil } +func (pr *PullRequest) GetHeadRepo() (err error) { + return pr.getHeadRepo(x) +} + func (pr *PullRequest) GetBaseRepo() (err error) { if pr.BaseRepo != nil { return nil @@ -130,8 +134,8 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error return fmt.Errorf("Issue.changeStatus: %v", err) } - if err = pr.GetHeadRepo(); err != nil { - return fmt.Errorf("GetHeadRepo: %v", err) + if err = pr.getHeadRepo(sess); err != nil { + return fmt.Errorf("getHeadRepo: %v", err) } headRepoPath := RepoPath(pr.HeadUserName, pr.HeadRepo.Name) |