Merge lp:~martin-hilton/juju-deployer/git-clone-fix into lp:juju-deployer

Proposed by Martin Hilton
Status: Merged
Merge reported by: Kapil Thangavelu
Merged at revision: not available
Proposed branch: lp:~martin-hilton/juju-deployer/git-clone-fix
Merge into: lp:juju-deployer
Diff against target: 17 lines (+5/-2)
1 file modified
deployer/vcs.py (+5/-2)
To merge this branch: bzr merge lp:~martin-hilton/juju-deployer/git-clone-fix
Reviewer Review Type Date Requested Status
juju-deployers Pending
Review via email: mp+236097@code.launchpad.net

Description of the change

I was having trouble with git clones so I put together a quick fix.

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

a related fix was merged, and released with deployer 0.4.3 (pypi)

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 2014-04-21 22:49:05 +0000
3+++ deployer/vcs.py 2014-09-26 10:18:19 +0000
4@@ -99,8 +99,11 @@
5 self._call(params, self.err_update)
6
7 def branch(self):
8- params = ["git", "clone", "--depth", "1", self.branch]
9- self._call(params, self.err_branch, os.path.dirname(self.path))
10+ params = ["git", "clone", "--depth", "1", self.origin, self.path]
11+ cwd = os.path.dirname(os.path.dirname(self.path))
12+ if not cwd:
13+ cwd = "."
14+ self._call(params, self.err_branch, cwd)
15
16 def is_modified(self):
17 params = ["git", "stat", "-s"]

Subscribers

People subscribed via source and target branches