comparison buttercup/source.py @ 45:048e391423a1

note about git config
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 05 Apr 2013 13:37:24 -0700
parents 693f209fdbaa
children b717de8b384f
comparison
equal deleted inserted replaced
44:693f209fdbaa 45:048e391423a1
69 call(['git', 'pull'], cwd=self.directory()) 69 call(['git', 'pull'], cwd=self.directory())
70 else: 70 else:
71 if not os.path.exists(self.srcdir): 71 if not os.path.exists(self.srcdir):
72 os.makedirs(self.srcdir) 72 os.makedirs(self.srcdir)
73 call(['git', 'clone', self.uri], cwd=self.srcdir) 73 call(['git', 'clone', self.uri], cwd=self.srcdir)
74 # TODO: add a more intelligent .git/config 74 # TODO: add a more intelligent .git/config, e.g.
75 75 # [core]
76 # repositoryformatversion = 0
77 # filemode = true
78 # bare = false
79 # logallrefupdates = true
80 # [remote "origin"]
81 # fetch = +refs/heads/*:refs/remotes/origin/*
82 # url = git://github.com/mozilla/toolbox.git
83 # pushurl = git@github.com:mozilla/toolbox.git
84 # [branch "master"]
85 # remote = origin
86 # merge = refs/heads/master
87 # see: http://git.661346.n2.nabble.com/Separate-default-push-pull-td4555821.html
76 88
77 def sources(source_dict, **kwargs): 89 def sources(source_dict, **kwargs):
78 """ 90 """
79 return source objects from a dict: 91 return source objects from a dict:
80 {'hg': ['http://k0s.org/hg/pyloader'], 92 {'hg': ['http://k0s.org/hg/pyloader'],