Mercurial > hg > buttercup
changeset 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 |
files | buttercup/checkout.py buttercup/source.py |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/buttercup/checkout.py Mon May 30 13:49:51 2011 -0700 +++ b/buttercup/checkout.py Mon May 30 13:56:45 2011 -0700 @@ -78,7 +78,6 @@ print "%s already exists" % source[0] else: subprocess.call(['hg', 'clone', source[1]]) - # TODO: add a more intelligent .hg/hgrc # install the sources if options.install:
--- 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):