Index: testing/charm.go |
=== modified file 'testing/charm.go' |
--- testing/charm.go 2013-02-11 05:54:45 +0000 |
+++ testing/charm.go 2013-04-26 14:19:24 +0000 |
@@ -54,6 +54,15 @@ |
return clone(dst, r.DirPath(name)) |
} |
+// RenamedClonedDirPath returns the path to a new copy of the default |
+// charm directory named name, but renames it to newName. |
+func (r *Repo) RenamedClonedDirPath(dst, name, newName string) string { |
+ newDst := clone(dst, r.DirPath(name)) |
+ renamedDst := filepath.Join(filepath.Dir(newDst), newName) |
+ check(os.Rename(newDst, renamedDst)) |
+ return renamedDst |
+} |
+ |
// ClonedDir returns an actual charm.Dir based on a new copy of the charm directory |
// named name, in the directory dst. |
func (r *Repo) ClonedDir(dst, name string) *charm.Dir { |