X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git_remote_helpers%2Fgit%2Fnon_local.py;h=f27389bb945ef423dc412c2368762439086f593e;hb=23b093ee087e99049585487f59e262a0e0662b6e;hp=d75ef8f214fda0748d7f8d690d3a811aa07d76c1;hpb=455bda993cceb42921c9ff173da26651f1d66602;p=git.git diff --git a/git_remote_helpers/git/non_local.py b/git_remote_helpers/git/non_local.py index d75ef8f21..f27389bb9 100644 --- a/git_remote_helpers/git/non_local.py +++ b/git_remote_helpers/git/non_local.py @@ -29,7 +29,9 @@ class NonLocalGit(object): os.makedirs(path) args = ["git", "clone", "--bare", "--quiet", self.repo.gitpath, path] - subprocess.check_call(args) + child = subprocess.Popen(args) + if child.wait() != 0: + raise CalledProcessError return path @@ -43,10 +45,14 @@ class NonLocalGit(object): die("could not find repo at %s", path) args = ["git", "--git-dir=" + path, "fetch", "--quiet", self.repo.gitpath] - subprocess.check_call(args) + child = subprocess.Popen(args) + if child.wait() != 0: + raise CalledProcessError args = ["git", "--git-dir=" + path, "update-ref", "refs/heads/master", "FETCH_HEAD"] - subprocess.check_call(args) + child = subprocess.Popen(args) + if child.wait() != 0: + raise CalledProcessError def push(self, base): """Pushes from the non-local repo to base. @@ -58,4 +64,6 @@ class NonLocalGit(object): die("could not find repo at %s", path) args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath] - subprocess.check_call(args) + child = subprocess.Popen(args) + if child.wait() != 0: + raise CalledProcessError