func (dir *CharmDir) SetDiskRevision(revision int) error {
	dir.SetRevision(revision)
	file, err := os.OpenFile(dir.join("revision"), os.O_WRONLY|os.O_CREATE, 0644)
	if err != nil {
		return err
	}
	_, err = file.Write([]byte(strconv.Itoa(revision)))
	file.Close()
	return err
}
// SetDiskRevision does the same as SetRevision but also changes
// the revision file in the charm directory.
SetDiskRevision does the same as SetRevision but also changes
the revision file in the charm directory.
// SetDiskRevision does the same as SetRevision but also changes // the revision file in the charm directory .
func (dir *CharmDir) SetDiskRevision(revision int) error {
	dir.SetRevision(revision)
	file, err := os.OpenFile(dir.join("revision"), os.O_WRONLY|os.O_CREATE, 0644)
	if err != nil {
		return err
	}
	_, err = file.Write([]byte(strconv.Itoa(revision)))
	file.Close()
	return err
}
func ( dir * CharmDir ) SetDiskRevision ( revision int ) error { dir . SetRevision ( revision ) file , err := os . OpenFile ( dir . join ( " " ) , os . O_WRONLY | os . O_CREATE , 0644 ) if err != nil { return err } _ , err = file . Write ( [ ] byte ( strconv . Itoa ( revision ) ) ) file . Close ( ) return err }
SetDiskRevision does the same as SetRevision but also changes
the revision file in the charm directory.
SetDiskRevision does the same as SetRevision but also changes the revision file in the charm directory .