Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(775)

Unified Diff: testing/charm.go

Issue 8540050: cmd/juju: upgrade-charm --switch support (Closed)
Patch Set: cmd/juju: upgrade-charm --switch support Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cmd/juju/upgradecharm_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « cmd/juju/upgradecharm_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b