aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs/git.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-28 13:22:27 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-28 13:22:27 -0500
commite0e7328742b92cb5e08aeec348fce966375d7d52 (patch)
treec9a1a14cbe6213b2ad9c23bbdfac63db121aba2b /libbe/storage/vcs/git.py
parentc90044dff5feaf5f43fee9e8559fecec2ec60091 (diff)
downloadbugseverywhere-e0e7328742b92cb5e08aeec348fce966375d7d52.tar.gz
Updated Git backend to support .children(revision).
+ some minor fixes to vcs/base.py and vcs/bzr.py Also removed .be/id-cache, which should never have been versioned in the first place.
Diffstat (limited to 'libbe/storage/vcs/git.py')
-rw-r--r--libbe/storage/vcs/git.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/libbe/storage/vcs/git.py b/libbe/storage/vcs/git.py
index 8d1b529..35dcd68 100644
--- a/libbe/storage/vcs/git.py
+++ b/libbe/storage/vcs/git.py
@@ -118,6 +118,26 @@ class Git(base.VCS):
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]
+ status,output,error = self._u_invoke_client(*args, expect=(0,128))
+ if status != 0:
+ if 'not a tree object' in error:
+ return False
+ raise base.CommandError(args, status, stderr=error)
+ return True
+
+ def _vcs_listdir(self, path, revision):
+ arg = '%s:%s' % (revision,path)
+ status,output,error = self._u_invoke_client(
+ 'ls-tree', '--name-only', arg)
+ return output.rstrip('\n').splitlines()
+
def _vcs_commit(self, commitfile, allow_empty=False):
args = ['commit', '--all', '--file', commitfile]
if allow_empty == True: