Merge lp:~marcoceppi/juju-deployer/local-branches into lp:juju-deployer/darwin

Proposed by Marco Ceppi
Status: Merged
Merged at revision: 112
Proposed branch: lp:~marcoceppi/juju-deployer/local-branches
Merge into: lp:juju-deployer/darwin
Diff against target: 17 lines (+4/-2)
1 file modified
deployer/charm.py (+4/-2)
To merge this branch: bzr merge lp:~marcoceppi/juju-deployer/local-branches
Reviewer Review Type Date Requested Status
Kapil Thangavelu Approve
Review via email: mp+181207@code.launchpad.net

Commit message

Allow locally sourced VCS branches as charms

Description of the change

This allows a charm to be set to a local bzr or git version controlled directory

To post a comment you must log in.
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

looks good, merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deployer/charm.py'
2--- deployer/charm.py 2013-07-23 19:39:11 +0000
3+++ deployer/charm.py 2013-08-21 07:32:27 +0000
4@@ -33,9 +33,11 @@
5 def get_vcs(self):
6 if not self.branch:
7 return None
8- if self.branch.startswith('git') or 'github.com' in self.branch:
9+ if self.branch.startswith('git') or 'github.com' in self.branch or \
10+ os.path.exists(os.path.join(self.branch, '.git')):
11 return Git(self.path, self.branch, self.log)
12- elif self.branch.startswith("bzr") or self.branch.startswith('lp:'):
13+ elif self.branch.startswith("bzr") or self.branch.startswith('lp:') \
14+ or os.path.exists(os.path.join(self.branch, '.bzr')):
15 return Bzr(self.path, self.branch, self.log)
16
17 @classmethod

Subscribers

People subscribed via source and target branches

to all changes: