func (c *Client) UploadBundle(id *charm.URL, b charm.Bundle) (*charm.URL, error) {
	if id.Revision != -1 {
		return nil, errgo.Newf("revision specified in %q, but should not be specified", id)
	}
	r, hash, size, err := openArchive(b)
	if err != nil {
		return nil, errgo.Notef(err, "cannot open bundle archive")
	}
	defer r.Close()
	return c.UploadArchive(id, r, hash, size, -1, nil)
}
// UploadBundle uploads the given charm to the charm store with the given id,
// which must not specify a revision.
// The accepted bundle implementations are charm.BundleDir and
// charm.BundleArchive.
//
// UploadBundle returns the id that the bundle has been given in the
// store - this will be the same as id except the revision.
UploadBundle uploads the given charm to the charm store with the given id,
which must not specify a revision.
The accepted bundle implementations are charm.BundleDir and
charm.BundleArchive.

UploadBundle returns the id that the bundle has been given in the
store - this will be the same as id except the revision.
// UploadBundle uploads the given charm to the charm store with the given id // which must not specify a revision . // The accepted bundle implementations are charm . BundleDir and // charm . BundleArchive . // // UploadBundle returns the id that the bundle has been given in the // store - this will be the same as id except the revision .
func (c *Client) UploadBundle(id *charm.URL, b charm.Bundle) (*charm.URL, error) {
	if id.Revision != -1 {
		return nil, errgo.Newf("revision specified in %q, but should not be specified", id)
	}
	r, hash, size, err := openArchive(b)
	if err != nil {
		return nil, errgo.Notef(err, "cannot open bundle archive")
	}
	defer r.Close()
	return c.UploadArchive(id, r, hash, size, -1, nil)
}
func ( c * Client ) UploadBundle ( id * charm . URL , b charm . Bundle ) ( * charm . URL , error ) { if id . Revision != - 1 { return nil , errgo . Newf ( " " , id ) } r , hash , size , err := openArchive ( b ) if err != nil { return nil , errgo . Notef ( err , " " ) } defer r . Close ( ) return c . UploadArchive ( id , r , hash , size , - 1 , nil ) }
UploadBundle uploads the given charm to the charm store with the given id,
which must not specify a revision.
UploadBundle uploads the given charm to the charm store with the given id which must not specify a revision .