allow delete for a single repo
This commit is contained in:
parent
5eb51f2832
commit
b27a1fccad
3
argv.go
3
argv.go
|
@ -20,6 +20,7 @@ type args struct {
|
||||||
Patch *PatchCmd `arg:"subcommand:patch" help:"examine and make patch sets"`
|
Patch *PatchCmd `arg:"subcommand:patch" help:"examine and make patch sets"`
|
||||||
GitPull *FindCmd `arg:"subcommand:pull" help:"run 'git pull'"`
|
GitPull *FindCmd `arg:"subcommand:pull" help:"run 'git pull'"`
|
||||||
Rescan *EmptyCmd `arg:"subcommand:rescan" help:"recreate the git protobuf repos.pb file"`
|
Rescan *EmptyCmd `arg:"subcommand:rescan" help:"recreate the git protobuf repos.pb file"`
|
||||||
|
Delete *EmptyCmd `arg:"subcommand:delete" help:"untrack a repo"`
|
||||||
URL string `arg:"--connect" help:"gowebd url"`
|
URL string `arg:"--connect" help:"gowebd url"`
|
||||||
Bash bool `arg:"--bash" help:"generate bash completion"`
|
Bash bool `arg:"--bash" help:"generate bash completion"`
|
||||||
BashAuto []string `arg:"--auto-complete" help:"does the actual autocompletion"`
|
BashAuto []string `arg:"--auto-complete" help:"does the actual autocompletion"`
|
||||||
|
@ -29,6 +30,8 @@ type args struct {
|
||||||
type EmptyCmd struct {
|
type EmptyCmd struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type testCmd string
|
||||||
|
|
||||||
type PatchCmd struct {
|
type PatchCmd struct {
|
||||||
List *EmptyCmd `arg:"subcommand:list" help:"list available patches"`
|
List *EmptyCmd `arg:"subcommand:list" help:"list available patches"`
|
||||||
Show *EmptyCmd `arg:"subcommand:show" help:"show a specific patch"`
|
Show *EmptyCmd `arg:"subcommand:show" help:"show a specific patch"`
|
||||||
|
|
|
@ -12,6 +12,10 @@ import (
|
||||||
// used for shell auto completion
|
// used for shell auto completion
|
||||||
// var ARGNAME string = "forge" // todo: get this from $0 ?
|
// var ARGNAME string = "forge" // todo: get this from $0 ?
|
||||||
|
|
||||||
|
func (a *EmptyCmd) deleteMatch() {
|
||||||
|
fmt.Println("go.wit.com/lib/gui/repostatus")
|
||||||
|
}
|
||||||
|
|
||||||
func (args) doBashAuto() {
|
func (args) doBashAuto() {
|
||||||
argv.doBashHelp()
|
argv.doBashHelp()
|
||||||
switch argv.BashAuto[0] {
|
switch argv.BashAuto[0] {
|
||||||
|
@ -32,10 +36,12 @@ func (args) doBashAuto() {
|
||||||
fmt.Println("--force")
|
fmt.Println("--force")
|
||||||
case "master":
|
case "master":
|
||||||
fmt.Println("--force")
|
fmt.Println("--force")
|
||||||
|
case "delete":
|
||||||
|
argv.Delete.deleteMatch()
|
||||||
default:
|
default:
|
||||||
if argv.BashAuto[0] == ARGNAME {
|
if argv.BashAuto[0] == ARGNAME {
|
||||||
// list the subcommands here
|
// list the subcommands here
|
||||||
fmt.Println("--bash checkout config dirty hard-reset list patch pull rescan")
|
fmt.Println("--bash checkout config dirty delete hard-reset list patch pull rescan")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|
3
cobol.go
3
cobol.go
|
@ -165,6 +165,9 @@ func verifyPrint(repo *gitpb.Repo) {
|
||||||
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
|
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
|
||||||
end += "(readonly) "
|
end += "(readonly) "
|
||||||
}
|
}
|
||||||
|
if repo.GetMasterBranchName() != "master" && repo.GetMasterBranchName() != "main" {
|
||||||
|
end += "(m:" + repo.GetMasterBranchName() + ") "
|
||||||
|
}
|
||||||
|
|
||||||
log.Info(start, end)
|
log.Info(start, end)
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ func (r *repoWindow) repoMenu() *gui.Node {
|
||||||
box2.NewButton("test master merge", func() {
|
box2.NewButton("test master merge", func() {
|
||||||
r.Disable()
|
r.Disable()
|
||||||
r.mergeAllDevelToMain()
|
r.mergeAllDevelToMain()
|
||||||
r.reInitForge()
|
// r.reInitForge()
|
||||||
r.Enable()
|
r.Enable()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -176,8 +176,14 @@ func (r *repoWindow) mergeAllDevelToMain() bool {
|
||||||
}
|
}
|
||||||
if result, err := repo.MergeDevelToMaster(); err == nil {
|
if result, err := repo.MergeDevelToMaster(); err == nil {
|
||||||
log.Warn("MERGE WORKED", repo.GetFullPath())
|
log.Warn("MERGE WORKED", repo.GetFullPath())
|
||||||
|
repo.Reload()
|
||||||
|
vrepo := me.repos.View.FindByPath(repo.GetGoPath())
|
||||||
|
if vrepo != nil {
|
||||||
|
vrepo.UpdatePb(repo)
|
||||||
|
vrepo.NewScan()
|
||||||
|
}
|
||||||
// continue
|
// continue
|
||||||
return true
|
continue
|
||||||
} else {
|
} else {
|
||||||
log.Warn("THINGS FAILED ", repo.GetFullPath())
|
log.Warn("THINGS FAILED ", repo.GetFullPath())
|
||||||
log.Warn("err", err)
|
log.Warn("err", err)
|
||||||
|
|
Loading…
Reference in New Issue