summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-07-03 14:29:36 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-07-03 14:29:36 +0100
commit3e31c8211d5ec1f642917d7609ed77fc54cf0a0b (patch)
treeac50b2033eaf0182a34d2cc53b9e5aaffb23f6a3 /morphlib
parentf6b5231a69b35cc7ec42140528e2804444f5667a (diff)
parent1ae13b980858f0aad617efce8541b75876d27b76 (diff)
downloadmorph-3e31c8211d5ec1f642917d7609ed77fc54cf0a0b.tar.gz
Merge branch 'master' of roadtrain.codethink.co.uk:baserock/morph
Diffstat (limited to 'morphlib')
-rwxr-xr-xmorphlib/app.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index 7c6d852c..c588f381 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -820,11 +820,9 @@ class Morph(cliapp.Application):
morphlib.git.set_remote(self.runcmd, dirname, 'origin', repo.url)
# Add push url rewrite rule to .git/config.
- filename = os.path.join(dirname, '.git', 'config')
- with open(filename, 'a') as f:
- f.write('\n')
- f.write('[url "%s"]\n' % repo_resolver.push_url(reponame))
- f.write('\tpushInsteadOf = %s\n' %repo_resolver.pull_url(reponame))
+ self.runcmd(['git', 'config',
+ 'url.%s.pushInsteadOf'% repo_resolver.push_url(reponame),
+ repo_resolver.pull_url(reponame)], cwd=dirname)
# Update remotes.
self.runcmd(['git', 'remote', 'update'], cwd=dirname)