comparison treepkg/git.py @ 558:bee73fd5bb82

Set default branch to "master"
author Bjoern Ricks <bricks@intevation.de>
date Fri, 02 Sep 2011 09:26:26 +0000
parents 9824e409388b
children 3fbf0ea1740a
comparison
equal deleted inserted replaced
557:9824e409388b 558:bee73fd5bb82
34 defaults to master 34 defaults to master
35 """ 35 """
36 self.url = url 36 self.url = url
37 self.local_branch = "local" 37 self.local_branch = "local"
38 self.branch = branch 38 self.branch = branch
39 if not branch:
40 self.branch = "master"
39 if ":" in branch: 41 if ":" in branch:
40 branches = branch.split(":") 42 branches = branch.split(":")
41 self.local_branch = branches[0] 43 self.local_branch = branches[0]
42 self.branch = branches[1] 44 self.branch = branches[1]
43 # use master as default 45 # use master as default
44 if not branch:
45 self.branch = "master"
46 46
47 def checkout(self, localdir): 47 def checkout(self, localdir):
48 """Clones the repository at url into the localdir""" 48 """Clones the repository at url into the localdir"""
49 run.call(cmdexpand("git clone -q $url $localdir", **locals())) 49 run.call(cmdexpand("git clone -q $url $localdir", **locals()))
50 if branch: 50 if branch:
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)