Mercurial > hg > fetch
changeset 11:726c3d288733
* add convenience import in __init__
* stub out HgFetcher a tad
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 18 Sep 2011 19:00:18 -0700 |
parents | 0b534c8881de |
children | a99a96f67500 |
files | fetch/__init__.py fetch/main.py |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/fetch/__init__.py Sun Sep 18 18:52:08 2011 -0700 +++ b/fetch/__init__.py Sun Sep 18 19:00:18 2011 -0700 @@ -1,1 +1,2 @@ # +from main import *
--- a/fetch/main.py Sun Sep 18 18:52:08 2011 -0700 +++ b/fetch/main.py Sun Sep 18 19:00:18 2011 -0700 @@ -73,12 +73,19 @@ ### VCS fetchers using executable +import subprocess + if which('hg'): class HgFetcher(Fetcher): """checkout a mercurial repository""" type = 'hg' + def __call__(self, dest): + if os.path.exits(dest): + assert os.path.isdir(dest) and os.path.exists(os.path.join(dest, '.hg')) + pass # TODO + fetchers.append(HgFetcher) class GitFetcher(Fetcher):