equal
deleted
inserted
replaced
291 class convert_git: |
291 class convert_git: |
292 def __init__(self, path): |
292 def __init__(self, path): |
293 if os.path.isdir(path + "/.git"): |
293 if os.path.isdir(path + "/.git"): |
294 path += "/.git" |
294 path += "/.git" |
295 self.path = path |
295 self.path = path |
296 if not os.path.exists(path + "/HEAD"): |
296 if not os.path.exists(path + "/objects"): |
297 raise NoRepo("couldn't open GIT repo %s" % path) |
297 raise NoRepo("couldn't open GIT repo %s" % path) |
298 |
298 |
299 def getheads(self): |
299 def getheads(self): |
300 fh = os.popen("GIT_DIR=%s git-rev-parse --verify HEAD" % self.path) |
300 fh = os.popen("GIT_DIR=%s git-rev-parse --verify HEAD" % self.path) |
301 return [fh.read()[:-1]] |
301 return [fh.read()[:-1]] |