# HG changeset patch # User Alexis S. L. Carvalho # Date 1153774049 25200 # Node ID e6a7a6a33a6226feac334354c63f05f3b288ae01 # Parent df5e58c84b010bcf83cb12ed106fae74d3b0da5b make convert-repo deal with git symbolic refs. Problem noticed by Sébastien Pierre diff --git a/contrib/convert-repo b/contrib/convert-repo --- a/contrib/convert-repo +++ b/contrib/convert-repo @@ -28,7 +28,8 @@ class convert_git: self.path = path def getheads(self): - return [file(self.path + "/HEAD").read()[:-1]] + fh = os.popen("GIT_DIR=%s git-rev-parse --verify HEAD" % self.path) + return [fh.read()[:-1]] def catfile(self, rev, type): if rev == "0" * 40: raise IOError()