changeset 5860:6e19e7c1931a

Thinko, refs/... is a file, not a dir. Fixes lilypond/git branch builds.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Wed, 09 Dec 2009 11:52:42 +0100
parents b25a304ef105
children 9293b8c52017
files gub/repository.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gub/repository.py	Wed Dec 09 09:37:53 2009 +0100
+++ b/gub/repository.py	Wed Dec 09 11:52:42 2009 +0100
@@ -615,7 +615,7 @@
         if not os.path.isdir (os.path.join (self.dir, 'refs')):
             return False
         ref = 'refs/heads/%(url_host)s/%(url_dir)s/%(branch)s' % self.__dict__
-        if not os.path.isdir (os.path.join (self.dir, ref)):
+        if not os.path.exists (os.path.join (self.dir, ref)):
             return False
         if self.revision:
             result = self.git_pipe ('cat-file commit %s' % self.revision,
@@ -675,6 +675,8 @@
         branch = self.branch # branch is empty?
         branch = 'master'
         HEAD = self.checksum ()
+        if HEAD == 'invalid':
+            barf
         if not os.path.isdir (os.path.join (destdir, self.vc_system)):
             self.system ('mkdir -p %(destdir)s' % locals ())
             self.system ('cd %(destdir)s && git init' % locals ())