def test_push(self): repo = Jagare(self.path) path2 = self.get_temp_path() repo2 = Jagare.init(path2, bare=True) assert repo2.empty repo.add_remote('origin', repo2.path) repo.push('origin', 'master') assert not repo2.empty
def push(self, path, remote, ref, env): try: repo = Jagare(path) ret = repo.push(remote, ref, _env=env) return ProcessResultConverter(**ret).convert() except Exception as e: raise ServiceUnavailable(repr(e))