allow on the fly tagging when uploading with camput

Change-Id: Ib4318551f6d020499294362f8c650e11da208eab
This commit is contained in:
mpl 2011-08-06 19:29:05 +02:00
parent 999098b187
commit 7860ecead0
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,7 @@ var flagShare = flag.Bool("share", false, "create a camli share by haveref with
var flagTransitive = flag.Bool("transitive", true, "share the transitive closure of the given blobrefs")
var flagRemove = flag.Bool("remove", false, "remove the list of blobrefs")
var flagName = flag.String("name", "", "Optional name attribute to set on permanode when using -permanode and -file")
var flagTag = flag.String("tag", "", "Optional tag attribute to set on permanode when using -permanode and -file")
var flagVerbose = flag.Bool("verbose", false, "be verbose")
var flagSetAttr = flag.Bool("set-attr", false, "set (replace) an attribute")
@ -300,6 +301,10 @@ func main() {
put, err := up.UploadAndSignMap(schema.NewSetAttributeClaim(permaNode.BlobRef, "name", *flagName))
handleResult("claim-permanode-name", put, err)
}
if *flagTag != "" {
put, err := up.UploadAndSignMap(schema.NewSetAttributeClaim(permaNode.BlobRef, "camliTag", *flagTag))
handleResult("claim-permanode-tag", put, err)
}
handleResult("permanode", permaNode, nil)
}
case *flagPermanode: