diff options
author | Bwko <bouwko@gmail.com> | 2016-12-28 09:33:21 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-28 16:33:21 +0800 |
commit | 331316894e391beb29fdebf9d8088973759bba1c (patch) | |
tree | e80827f0c2a87006c1601d3f1e93611644722a3a /models | |
parent | f686a32eac75460d5b1fcf16b6f6c2ed57f5b03e (diff) | |
download | gitea-331316894e391beb29fdebf9d8088973759bba1c.tar.gz gitea-331316894e391beb29fdebf9d8088973759bba1c.zip |
Replace Gogs with Gitea (#520)
Diffstat (limited to 'models')
-rw-r--r-- | models/migrations/migrations.go | 4 | ||||
-rw-r--r-- | models/repo.go | 6 | ||||
-rw-r--r-- | models/ssh_key.go | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 6393747b0e..66f80dac30 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -103,13 +103,13 @@ func Migrate(x *xorm.Engine) error { v := currentVersion.Version if minDBVersion > v { - log.Fatal(4, `Gogs no longer supports auto-migration from your previously installed version. + log.Fatal(4, `Gitea no longer supports auto-migration from your previously installed version. Please try to upgrade to a lower version (>= v0.6.0) first, then upgrade to current version.`) return nil } if int(v-minDBVersion) > len(migrations) { - // User downgraded Gogs. + // User downgraded Gitea. currentVersion.Version = int64(len(migrations) + minDBVersion) _, err = x.Id(1).Update(currentVersion) return err diff --git a/models/repo.go b/models/repo.go index 64369dabbb..33d84642df 100644 --- a/models/repo.go +++ b/models/repo.go @@ -141,11 +141,11 @@ func NewRepoContext() { log.Info("Git Version: %s", gitVer) if version.Compare("1.7.1", gitVer, ">") { - log.Fatal(4, "Gogs requires Git version greater or equal to 1.7.1") + log.Fatal(4, "Gitea requires Git version greater or equal to 1.7.1") } // Git requires setting user.name and user.email in order to commit changes. - for configKey, defaultValue := range map[string]string{"user.name": "Gogs", "user.email": "gogs@fake.local"} { + for configKey, defaultValue := range map[string]string{"user.name": "Gitea", "user.email": "gitea@fake.local"} { if stdout, stderr, err := process.Exec("NewRepoContext(get setting)", "git", "config", "--get", configKey); err != nil || strings.TrimSpace(stdout) == "" { // ExitError indicates this config is not set if _, ok := err.(*exec.ExitError); ok || strings.TrimSpace(stdout) == "" { @@ -926,7 +926,7 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, opts C return fmt.Errorf("createUpdateHook: %v", err) } - tmpDir := filepath.Join(os.TempDir(), "gogs-"+repo.Name+"-"+com.ToStr(time.Now().Nanosecond())) + tmpDir := filepath.Join(os.TempDir(), "gitea-"+repo.Name+"-"+com.ToStr(time.Now().Nanosecond())) // Initialize repository according to user's choice. if opts.AutoInit { diff --git a/models/ssh_key.go b/models/ssh_key.go index f98a6b76f4..d7d71f68cb 100644 --- a/models/ssh_key.go +++ b/models/ssh_key.go @@ -172,7 +172,7 @@ func parseKeyString(content string) (string, error) { // writeTmpKeyFile writes key content to a temporary file // and returns the name of that file, along with any possible errors. func writeTmpKeyFile(content string) (string, error) { - tmpFile, err := ioutil.TempFile(setting.SSH.KeyTestPath, "gogs_keytest") + tmpFile, err := ioutil.TempFile(setting.SSH.KeyTestPath, "gitea_keytest") if err != nil { return "", fmt.Errorf("TempFile: %v", err) } |