equal
deleted
inserted
replaced
26 class convert_git: |
26 class convert_git: |
27 def __init__(self, path): |
27 def __init__(self, path): |
28 self.path = path |
28 self.path = path |
29 |
29 |
30 def getheads(self): |
30 def getheads(self): |
31 return [file(self.path + "/HEAD").read()[:-1]] |
31 fh = os.popen("GIT_DIR=%s git-rev-parse --verify HEAD" % self.path) |
|
32 return [fh.read()[:-1]] |
32 |
33 |
33 def catfile(self, rev, type): |
34 def catfile(self, rev, type): |
34 if rev == "0" * 40: raise IOError() |
35 if rev == "0" * 40: raise IOError() |
35 fh = os.popen("GIT_DIR=%s git-cat-file %s %s 2>/dev/null" % (self.path, type, rev)) |
36 fh = os.popen("GIT_DIR=%s git-cat-file %s %s 2>/dev/null" % (self.path, type, rev)) |
36 return fh.read() |
37 return fh.read() |