mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 15:13:53 +03:00
#1711 try to indicate sqlite session issue when merge
This commit is contained in:
parent
022820103d
commit
87c3c8172a
3 changed files with 8 additions and 6 deletions
|
@ -1 +0,0 @@
|
||||||
Leiningen.gitignore
|
|
|
@ -1 +0,0 @@
|
||||||
C++.gitignore
|
|
|
@ -73,14 +73,18 @@ func (pr *PullRequest) AfterSet(colName string, _ xorm.Cell) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pr *PullRequest) GetHeadRepo() (err error) {
|
func (pr *PullRequest) getHeadRepo(e Engine) (err error) {
|
||||||
pr.HeadRepo, err = GetRepositoryByID(pr.HeadRepoID)
|
pr.HeadRepo, err = getRepositoryByID(e, pr.HeadRepoID)
|
||||||
if err != nil && !IsErrRepoNotExist(err) {
|
if err != nil && !IsErrRepoNotExist(err) {
|
||||||
return fmt.Errorf("GetRepositoryByID (head): %v", err)
|
return fmt.Errorf("GetRepositoryByID (head): %v", err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (pr *PullRequest) GetHeadRepo() (err error) {
|
||||||
|
return pr.getHeadRepo(x)
|
||||||
|
}
|
||||||
|
|
||||||
func (pr *PullRequest) GetBaseRepo() (err error) {
|
func (pr *PullRequest) GetBaseRepo() (err error) {
|
||||||
if pr.BaseRepo != nil {
|
if pr.BaseRepo != nil {
|
||||||
return 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)
|
return fmt.Errorf("Issue.changeStatus: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = pr.GetHeadRepo(); err != nil {
|
if err = pr.getHeadRepo(sess); err != nil {
|
||||||
return fmt.Errorf("GetHeadRepo: %v", err)
|
return fmt.Errorf("getHeadRepo: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
headRepoPath := RepoPath(pr.HeadUserName, pr.HeadRepo.Name)
|
headRepoPath := RepoPath(pr.HeadUserName, pr.HeadRepo.Name)
|
||||||
|
|
Loading…
Reference in a new issue