func ProfileReplaceRevision(profile string, rev int) (string, error) {
	if !IsValidName(profile) {
		return "", errors.BadRequestf("not a juju profile name: %q", profile)
	}
	split := strings.Split(profile, "-")
	notRev := split[:len(split)-1]
	return strings.Join(append(notRev, strconv.Itoa(rev)), "-"), nil
}
// ProfileReplaceRevision replaces the old revision with a new revision
// in the profile.
ProfileReplaceRevision replaces the old revision with a new revision
in the profile.
// ProfileReplaceRevision replaces the old revision with a new revision // in the profile .
func ProfileReplaceRevision(profile string, rev int) (string, error) {
	if !IsValidName(profile) {
		return "", errors.BadRequestf("not a juju profile name: %q", profile)
	}
	split := strings.Split(profile, "-")
	notRev := split[:len(split)-1]
	return strings.Join(append(notRev, strconv.Itoa(rev)), "-"), nil
}
func ProfileReplaceRevision ( profile string , rev int ) ( string , error ) { if ! IsValidName ( profile ) { return " " , errors . BadRequestf ( " " , profile ) } split := strings . Split ( profile , " " ) notRev := split [ : len ( split ) - 1 ] return strings . Join ( append ( notRev , strconv . Itoa ( rev ) ) , " " ) , nil }
ProfileReplaceRevision replaces the old revision with a new revision
in the profile.
ProfileReplaceRevision replaces the old revision with a new revision in the profile .