# HG changeset patch # User Jeff Hammel # Date 1306789005 25200 # Node ID 1f54294629f923891bd82e68621227014972cbc3 # Parent 60ddc49acd5fca3747ade1ea9f6a2db8a47ef07d finish hg updater method diff -r 60ddc49acd5f -r 1f54294629f9 buttercup/checkout.py --- 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: diff -r 60ddc49acd5f -r 1f54294629f9 buttercup/source.py --- 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):