diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-02-08 13:52:47 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-02-09 16:06:17 +0000 |
commit | a87c7b616a269ee4b6b530cf5069df1423a49bd4 (patch) | |
tree | 9b4e7fb2d3c778e3e241fe764d06197008505097 /morphlib/git.py | |
parent | 24d0fa25530dc6dcc423f4a9eac417c60b8eb093 (diff) | |
download | morph-a87c7b616a269ee4b6b530cf5069df1423a49bd4.tar.gz |
Change how git clones are created from bundles
For some reason, "git bundle unbundle" doesn't work for me, but "git clone" does.
Then, adding a remote fails, because the cloned bundle already has one, so now
we'll use "git remote set-url" and "git remote update".
Diffstat (limited to 'morphlib/git.py')
-rw-r--r-- | morphlib/git.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/morphlib/git.py b/morphlib/git.py index 0b774229..47de2f61 100644 --- a/morphlib/git.py +++ b/morphlib/git.py @@ -221,7 +221,7 @@ def get_morph_text(treeish, filename, msg=logging.debug): def extract_bundle(location, bundle, msg=logging.debug): '''Extract a bundle into git at location''' ex = morphlib.execute.Execute(location, msg=msg) - return ex.runv(['git', 'bundle', 'unbundle', bundle]) + return ex.runv(['git', 'clone', bundle, '.']) def clone(location, repo, msg=logging.debug): '''clone at git repo into location''' @@ -234,10 +234,10 @@ def init(location, msg=logging.debug): ex = morphlib.execute.Execute(location, msg=msg) return ex.runv(['git', 'init']) -def add_remote(gitdir, name, url, msg=logging.debug): - '''add remote with name 'name' for url at gitdir''' +def set_remote(gitdir, name, url, msg=logging.debug): + '''Set remote with name 'name' use a given url at gitdir''' ex = morphlib.execute.Execute(gitdir, msg=msg) - return ex.runv(['git', 'remote', 'add', '-f', name, url]) + return ex.runv(['git', 'remote', 'set-url', name, url]) def update_remote(gitdir, name, msg=logging.debug): ex = morphlib.execute.Execute(gitdir, msg=msg) |