-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove remaining Gogs reference on locales and cmd #430
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// Copyright 2014 The Gogs Authors. All rights reserved. | ||
// Copyright 2016 The Gitea Authors. All rights reserved. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ |
||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
|
@@ -21,9 +22,9 @@ import ( | |
// CmdDump represents the available dump sub-command. | ||
var CmdDump = cli.Command{ | ||
Name: "dump", | ||
Usage: "Dump Gogs files and database", | ||
Usage: "Dump Gitea files and database", | ||
Description: `Dump compresses all related files and database into zip file. | ||
It can be used for backup and capture Gogs server image to send to maintainer`, | ||
It can be used for backup and capture Gitea server image to send to maintainer`, | ||
Action: runDump, | ||
Flags: []cli.Flag{ | ||
cli.StringFlag{ | ||
|
@@ -55,14 +56,14 @@ func runDump(ctx *cli.Context) error { | |
if _, err := os.Stat(tmpDir); os.IsNotExist(err) { | ||
log.Fatalf("Path does not exist: %s", tmpDir) | ||
} | ||
TmpWorkDir, err := ioutil.TempDir(tmpDir, "gogs-dump-") | ||
TmpWorkDir, err := ioutil.TempDir(tmpDir, "gitea-dump-") | ||
if err != nil { | ||
log.Fatalf("Fail to create tmp work directory: %v", err) | ||
} | ||
log.Printf("Creating tmp work dir: %s", TmpWorkDir) | ||
|
||
reposDump := path.Join(TmpWorkDir, "gogs-repo.zip") | ||
dbDump := path.Join(TmpWorkDir, "gogs-db.sql") | ||
reposDump := path.Join(TmpWorkDir, "gitea-repo.zip") | ||
dbDump := path.Join(TmpWorkDir, "gitea-db.sql") | ||
|
||
log.Printf("Dumping local repositories...%s", setting.RepoRootPath) | ||
zip.Verbose = ctx.Bool("verbose") | ||
|
@@ -75,18 +76,18 @@ func runDump(ctx *cli.Context) error { | |
log.Fatalf("Fail to dump database: %v", err) | ||
} | ||
|
||
fileName := fmt.Sprintf("gogs-dump-%d.zip", time.Now().Unix()) | ||
fileName := fmt.Sprintf("gitea-dump-%d.zip", time.Now().Unix()) | ||
log.Printf("Packing dump files...") | ||
z, err := zip.Create(fileName) | ||
if err != nil { | ||
log.Fatalf("Fail to create %s: %v", fileName, err) | ||
} | ||
|
||
if err := z.AddFile("gogs-repo.zip", reposDump); err != nil { | ||
log.Fatalf("Fail to include gogs-repo.zip: %v", err) | ||
if err := z.AddFile("gitea-repo.zip", reposDump); err != nil { | ||
log.Fatalf("Fail to include gitea-repo.zip: %v", err) | ||
} | ||
if err := z.AddFile("gogs-db.sql", dbDump); err != nil { | ||
log.Fatalf("Fail to include gogs-db.sql: %v", err) | ||
if err := z.AddFile("gitea-db.sql", dbDump); err != nil { | ||
log.Fatalf("Fail to include gitea-db.sql: %v", err) | ||
} | ||
customDir, err := os.Stat(setting.CustomPath) | ||
if err == nil && customDir.IsDir() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// Copyright 2014 The Gogs Authors. All rights reserved. | ||
// Copyright 2016 The Gitea Authors. All rights reserved. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ |
||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
|
@@ -76,7 +77,7 @@ var ( | |
) | ||
|
||
func fail(userMessage, logMessage string, args ...interface{}) { | ||
fmt.Fprintln(os.Stderr, "Gogs:", userMessage) | ||
fmt.Fprintln(os.Stderr, "Gitea:", userMessage) | ||
|
||
if len(logMessage) > 0 { | ||
if !setting.ProdMode { | ||
|
@@ -144,7 +145,7 @@ func runServ(c *cli.Context) error { | |
setup("serv.log") | ||
|
||
if setting.SSH.Disabled { | ||
println("Gogs: SSH has been disabled") | ||
println("Gitea: SSH has been disabled") | ||
return nil | ||
} | ||
|
||
|
@@ -154,8 +155,8 @@ func runServ(c *cli.Context) error { | |
|
||
cmd := os.Getenv("SSH_ORIGINAL_COMMAND") | ||
if len(cmd) == 0 { | ||
println("Hi there, You've successfully authenticated, but Gogs does not provide shell access.") | ||
println("If this is unexpected, please log in with password and setup Gogs under another user.") | ||
println("Hi there, You've successfully authenticated, but Gitea does not provide shell access.") | ||
println("If this is unexpected, please log in with password and setup Gitea under another user.") | ||
return nil | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Copyright 2016 The Gitea Authors. All rights reserved. | ||
// Copyright 2014 The Gogs Authors. All rights reserved. | ||
// Copyright 2016 The Gitea Authors. All rights reserved. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ |
||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
|
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please send this line top on the Gogs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunny the correct is ordered by year asc, not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thinks it should be ordered by year desc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunny on Golang projects I don't know. In PHP and Python projects we put on year asc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know which habit is correct. But we have many codes order by desc. So I think we should keep it the same style. Maybe we can send another PR to do that after we confirm which style is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunny Okay, I will revert position and after we can talk about this 👍