move some debug stuff out of camput into new camdebug

Change-Id: I94c0451b7fabdccdcaff9ae3e5f4097bdb426b78
This commit is contained in:
Brad Fitzpatrick 2011-09-17 12:02:05 -07:00
parent 8c3edb6006
commit 3fbb8487e8
6 changed files with 38 additions and 8 deletions

View File

@ -1 +1 @@
6g version weekly.2011-09-16 9779
6g version weekly.2011-09-16 9785+

View File

@ -627,6 +627,7 @@ sub generate_embed_file {
__DATA__
TARGET: clients/go/camdbinit
TARGET: clients/go/camdebug
TARGET: clients/go/camget
TARGET: clients/go/camgsinit
TARGET: clients/go/camput

1
clients/go/camdebug/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
camdebug

View File

@ -0,0 +1,35 @@
/*
Copyright 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"flag"
"log"
)
var flagSplits = flag.Bool("splits", false, "show splits")
func main() {
flag.Parse()
if *flagSplits {
showSplits()
return
}
log.Fatalf("TODO: usage info")
}

View File

@ -47,8 +47,6 @@ var flagVerbose = flag.Bool("verbose", false, "be verbose")
var flagSetAttr = flag.Bool("set-attr", false, "set (replace) an attribute")
var flagAddAttr = flag.Bool("add-attr", false, "add an attribute, additional if one already exists")
var flagSplits = flag.Bool("debug-splits", false, "show splits")
var wereErrors = false
type UploadCache interface {
@ -292,11 +290,6 @@ func main() {
jsonsign.AddFlags()
flag.Parse()
if *flagSplits {
showSplits()
return
}
nOpts := sumSet(flagFile, flagBlob, flagPermanode, flagInit, flagShare, flagRemove,
flagSetAttr, flagAddAttr)
if !(nOpts == 1 ||