Mercurial > hg > buttercup
diff buttercup/source.py @ 21:1f54294629f9
finish hg updater method
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 30 May 2011 13:56:45 -0700 |
parents | 60ddc49acd5f |
children | 1378e96c65ac |
line wrap: on
line diff
--- a/buttercup/source.py Mon May 30 13:49:51 2011 -0700 +++ b/buttercup/source.py Mon May 30 13:56:45 2011 -0700 @@ -28,7 +28,13 @@ call(['hg', 'pull'], cwd=self.directory) call(['hg', 'update'], cwd=self.directory) else: - pass + if not os.path.exists(self.srcdir): + os.makedirs(self.srcdir) + call(['hg', 'clone', self.uri], cwd=self.srcdir) + # TODO: add a more intelligent .hg/hgrc + + __call__ = update + class GitSource(Source):