Merge lp:~james-page/juju-deployer/git-branch-support into lp:juju-deployer

Proposed by James Page on 2016-03-03
Status: Merged
Merged at revision: 166
Proposed branch: lp:~james-page/juju-deployer/git-branch-support
Merge into: lp:juju-deployer
Diff against target: 20 lines (+9/-1)
1 file modified
deployer/vcs.py (+9/-1)
To merge this branch: bzr merge lp:~james-page/juju-deployer/git-branch-support
Reviewer Review Type Date Requested Status
juju-deployers 2016-03-03 Pending
Review via email: mp+287929@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deployer/vcs.py'
2--- deployer/vcs.py 2016-03-02 18:51:24 +0000
3+++ deployer/vcs.py 2016-03-03 12:47:00 +0000
4@@ -118,7 +118,15 @@
5 self._call(params, self.err_update)
6
7 def branch(self):
8- params = ["git", "clone", "--depth", "1", self.origin, self.path]
9+ params = ["git", "clone", "--depth", "1"]
10+ # Deal with branches in the format
11+ # <repository-url>;<branch>
12+ components = self.origin.split(';')
13+ if len(components) == 2:
14+ params += ["--branch", components[1],
15+ components[0], self.path]
16+ else:
17+ params += [self.origin, self.path]
18 cwd = os.path.dirname(os.path.dirname(self.path))
19 if not cwd:
20 cwd = "."

Subscribers

People subscribed via source and target branches