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