changeset 3155:f58239d01d4b

don't local_branch if revision is given.
author Han-Wen Nienhuys <hanwen@lilypond.org>
date Sun, 25 Feb 2007 21:27:27 +0100
parents 3576998db405
children b56f99c8d836
files lib/repository.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/repository.py	Sun Feb 25 21:27:12 2007 +0100
+++ b/lib/repository.py	Sun Feb 25 21:27:27 2007 +0100
@@ -215,6 +215,7 @@
         
         self.repo_dir = os.path.normpath (git_dir) + '.git'
         self.checksums = {}
+        self.local_branch = ''
         self.remote_branch = branch
         self.source = source
         self.revision = revision
@@ -239,8 +240,6 @@
             if branch:
                 self.local_branch = branch + self.repo_url_suffix
                 self.branch = self.local_branch
-            else:
-                self.local_branch = 'master' + self.repo_url_suffix
         else:
             self.branch = branch
             self.local_branch = branch
@@ -383,7 +382,7 @@
         if os.path.isdir (destdir + '/.git'):
             self.git ('pull %(repo_dir)s %(branch)s' % locals (), dir=destdir)
         else:
-            self.system ('git-clone -s %(repo_dir)s %(destdir)s' % locals ())
+            self.system ('git-clone -l -s %(repo_dir)s %(destdir)s' % locals ())
 
         if not revision:
             revision = open ('%(repo_dir)s/refs/heads/%(branch)s' % locals ()).read ()