~dave-cheney/juju-core/102-cmd-init-context

« back to all changes in this revision

Viewing changes to worker/uniter/charm/deployer.go

  • Committer: William Reade
  • Author(s): William Reade
  • Date: 2012-09-13 09:35:37 UTC
  • mfrom: (460.10.6 juju-core)
  • Revision ID: fwereade@gmail.com-20120913093537-ib0td1wi8vgawar5
implementĀ charmĀ upgrades

R=niemeyer
CC=
https://codereview.appspot.com/6503072

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        if err = WriteCharmURL(repo, url); err != nil {
72
72
                return err
73
73
        }
74
 
        if err = repo.Snapshotf("imported charm %s from %s", url, bun.Path); err != nil {
 
74
        if err = repo.Snapshotf("Imported charm %q from %q.", url, bun.Path); err != nil {
75
75
                return err
76
76
        }
77
77
 
128
128
        if err = repo.Pull(d.current); err != nil {
129
129
                return err
130
130
        }
131
 
        if err = repo.Snapshotf("deployed charm %s", url); err != nil {
 
131
        if err = repo.Snapshotf("Deployed charm %q.", url); err != nil {
132
132
                return err
133
133
        }
134
134
        log.Printf("deploying charm")
153
153
                        return err
154
154
                } else if !conflicted {
155
155
                        log.Printf("snapshotting dirty charm before upgrade")
156
 
                        if err = target.Snapshotf("pre-upgrade snapshot"); err != nil {
 
156
                        if err = target.Snapshotf("Pre-upgrade snapshot."); err != nil {
157
157
                                return err
158
158
                        }
159
159
                }
162
162
        if err := target.Pull(d.current); err != nil {
163
163
                return err
164
164
        }
165
 
        return target.Snapshotf("upgraded charm to %s", url)
 
165
        return target.Snapshotf("Upgraded charm to %q.", url)
166
166
}
167
167
 
168
168
// collectOrphans deletes all repos in path except the one pointed to by current.