set a Name for the patchset
This commit is contained in:
parent
3505a66d84
commit
55e7e11a4c
4
Makefile
4
Makefile
|
@ -1,8 +1,8 @@
|
|||
VERSION = $(shell git describe --tags)
|
||||
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||
|
||||
info:
|
||||
make dirty
|
||||
info: install
|
||||
# make dirty
|
||||
@echo "make restart # remove the repos.pb file"
|
||||
@echo "make private # only the private ones"
|
||||
@echo "make mine # just show my repos"
|
||||
|
|
14
argv.go
14
argv.go
|
@ -15,19 +15,19 @@ type FindCmd struct {
|
|||
}
|
||||
|
||||
type DoCmd struct {
|
||||
List bool `arg:"--list" help:"just show a table of the current state"`
|
||||
GitPull bool `arg:"--pull" help:"run 'git pull'"`
|
||||
GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"`
|
||||
Scan bool `arg:"--scan" help:"reload protobuf from .git/"`
|
||||
Force bool `arg:"--force" help:"force redo things"`
|
||||
Dirty bool `arg:"--dirty" help:"update git CheckDirty()"`
|
||||
List bool `arg:"--list" help:"just show a table of the current state"`
|
||||
GitPull bool `arg:"--pull" help:"run 'git pull'"`
|
||||
GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"`
|
||||
Scan bool `arg:"--scan" help:"reload protobuf from .git/"`
|
||||
Force bool `arg:"--force" help:"force redo things"`
|
||||
Dirty bool `arg:"--dirty" help:"update git CheckDirty()"`
|
||||
PatchSet string `arg:"--patchset" help:"make patch set"`
|
||||
}
|
||||
|
||||
type args struct {
|
||||
Find *FindCmd `arg:"subcommand:find" help:"select repos (for example, --all or --mine)"`
|
||||
Do *DoCmd `arg:"subcommand:do" help:"do something ('git pull', 'build', 'install', etc)"`
|
||||
Config bool `arg:"--config" help:"show your .config/forge/ settings"`
|
||||
DoPatchSet bool `arg:"--make-patchset" help:"make patch set"`
|
||||
ListPatchSet bool `arg:"--list-patchset" help:"list patch sets"`
|
||||
DryRun bool `arg:"--dry-run" help:"show what would be run"`
|
||||
Fix bool `arg:"--fix" help:"fix config, save config & exit"`
|
||||
|
|
|
@ -54,7 +54,7 @@ func doCheckDirty() {
|
|||
}
|
||||
}
|
||||
}
|
||||
doCobol()
|
||||
// doCobol()
|
||||
log.Info("dirty check took:", shell.FormatDuration(time.Since(now)))
|
||||
me.forge.SetConfigSave(configSave)
|
||||
}
|
||||
|
|
14
main.go
14
main.go
|
@ -32,6 +32,9 @@ func main() {
|
|||
me = new(mainType)
|
||||
me.pp = arg.MustParse(&argv)
|
||||
me.urlbase = argv.URL
|
||||
if me.urlbase == "" {
|
||||
me.urlbase = "https://go.wit.com/"
|
||||
}
|
||||
me.urlbase = strings.Trim(me.urlbase, "/") // track down why trailing '/' makes http POST not work
|
||||
|
||||
// load the ~/.config/forge/ config
|
||||
|
@ -108,12 +111,11 @@ func main() {
|
|||
doCobol()
|
||||
done = true
|
||||
}
|
||||
}
|
||||
|
||||
if argv.DoPatchSet {
|
||||
sendDevelDiff()
|
||||
// sendMasterDiff()
|
||||
okExit("patches")
|
||||
if argv.Do.PatchSet != "" {
|
||||
sendDevelDiff(argv.Do.PatchSet)
|
||||
// sendMasterDiff()
|
||||
okExit("patches")
|
||||
}
|
||||
}
|
||||
|
||||
if argv.ListPatchSet {
|
||||
|
|
15
send.go
15
send.go
|
@ -80,26 +80,15 @@ func getPatch(pbfile string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func sendDevelDiff() {
|
||||
func sendDevelDiff(name string) {
|
||||
pset, err := me.forge.MakeDevelPatchSet()
|
||||
if err != nil {
|
||||
badExit(err)
|
||||
}
|
||||
pset.Name = name
|
||||
if err := sendPatches(pset); err != nil {
|
||||
badExit(err)
|
||||
}
|
||||
|
||||
/*
|
||||
all := pset.SortByFilename()
|
||||
for all.Scan() {
|
||||
p := all.Next()
|
||||
log.Info("read in patch:", p.Filename)
|
||||
}
|
||||
err = me.forge.SendPatchSet(pset)
|
||||
if err != nil {
|
||||
badExit(err)
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
func sendMasterDiff() {
|
||||
|
|
|
@ -157,7 +157,7 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
|
|||
}
|
||||
}
|
||||
s.submitB = s.grid.NewButton("Submit", func() {
|
||||
sendDevelDiff()
|
||||
sendDevelDiff(s.reason.String())
|
||||
/*
|
||||
dirname := "submit-patchset.quilt"
|
||||
patchdir := filepath.Join(me.userHomePwd.String(), dirname)
|
||||
|
|
Loading…
Reference in New Issue