import os
import subprocess
-from git_remote_helpers.util import die, warn
+from git_remote_helpers.util import check_call, die, warn
class NonLocalGit(object):
os.makedirs(path)
args = ["git", "clone", "--bare", "--quiet", self.repo.gitpath, path]
- subprocess.check_call(args)
+ check_call(args)
return path
die("could not find repo at %s", path)
args = ["git", "--git-dir=" + path, "fetch", "--quiet", self.repo.gitpath]
- subprocess.check_call(args)
+ check_call(args)
args = ["git", "--git-dir=" + path, "update-ref", "refs/heads/master", "FETCH_HEAD"]
- subprocess.check_call(args)
+ child = check_call(args)
def push(self, base):
"""Pushes from the non-local repo to base.
if not os.path.exists(path):
die("could not find repo at %s", path)
- args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath]
- subprocess.check_call(args)
+ args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath, "--all"]
+ child = check_call(args)