diff options
author | Matthew Fernandez <matthew.fernandez@gmail.com> | 2017-10-30 16:46:58 +0000 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2017-10-30 16:46:58 +0000 |
commit | 4dbb47e9f632823bbadcc0b844159c026135fae8 (patch) | |
tree | 9df484193d5107c19bbe239107b6414bc3f7a197 | |
parent | 4db24aa71fa2dded9e2c26fcacd3a8659eb62b7f (diff) | |
download | bugseverywhere-4dbb47e9f632823bbadcc0b844159c026135fae8.tar.gz |
Minor clean up of Git back end
-rw-r--r-- | libbe/storage/vcs/git.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libbe/storage/vcs/git.py b/libbe/storage/vcs/git.py index acdce15..851af19 100644 --- a/libbe/storage/vcs/git.py +++ b/libbe/storage/vcs/git.py @@ -66,7 +66,6 @@ class PygitGit(base.VCS): """ name='pygit2' _null_hex = u'0' * 40 - _null_oid = '\00' * 20 def __init__(self, *args, **kwargs): base.VCS.__init__(self, *args, **kwargs) @@ -184,7 +183,6 @@ class PygitGit(base.VCS): raise ValueError(path) # not a directory if child_tree is None: raise ValueError((path, sections, section, [e.name for e in tree])) - raise ValueError(path) # not found tree = child_tree eobj = None for entry in tree: @@ -286,7 +284,7 @@ class ExecGit (PygitGit): def _vcs_version(self): try: status,output,error = self._u_invoke_client('--version') - except CommandError: # command not found? + except base.CommandError: # command not found? return None return output.strip() @@ -332,11 +330,6 @@ class ExecGit (PygitGit): def _vcs_init(self, path): self._u_invoke_client('init', cwd=path) - def _vcs_destroy(self): - vcs_dir = os.path.join(self.repo, '.git') - if os.path.exists(vcs_dir): - shutil.rmtree(vcs_dir) - def _vcs_add(self, path): if os.path.isdir(path): return @@ -345,10 +338,6 @@ class ExecGit (PygitGit): def _vcs_remove(self, path): if not os.path.isdir(self._u_abspath(path)): self._u_invoke_client('rm', '-f', path) - - def _vcs_update(self, path): - self._vcs_add(path) - def _vcs_get_file_contents(self, path, revision=None): if revision == None: return base.VCS._vcs_get_file_contents(self, path, revision) @@ -357,9 +346,6 @@ class ExecGit (PygitGit): status,output,error = self._u_invoke_client('show', arg) return output - def _vcs_path(self, id, revision): - return self._u_find_id(id, revision) - def _vcs_isdir(self, path, revision): arg = '%s:%s' % (revision,path) args = ['ls-tree', arg] |