| Index: cms/sources.py |
| =================================================================== |
| --- a/cms/sources.py |
| +++ b/cms/sources.py |
| @@ -203,23 +203,23 @@ |
| def has_include(self, include, format): |
| return self.has_file(self.include_filename(include, format)) |
| def read_include(self, include, format): |
| return self.read_file(self.include_filename(include, format)) |
| class MercurialSource(Source): |
| - def __init__(self, repo): |
| - command = ['hg', '-R', repo, 'archive', '-r', 'default', |
| + def __init__(self, repo, revision): |
| + command = ['hg', '-R', repo, 'archive', '-r', revision, |
| '-t', 'uzip', '-p', 'root', '-'] |
| data = subprocess.check_output(command) |
| self._archive = zipfile.ZipFile(StringIO(data), mode='r') |
| - command = ['hg', '-R', repo, 'id', '-n', '-r', 'default'] |
| + command = ['hg', '-R', repo, 'id', '-n', '-r', revision] |
| self.version = subprocess.check_output(command).strip() |
| self._name = os.path.basename(repo.rstrip(os.path.sep)) |
| def __enter__(self): |
| return self |
| def __exit__(self, type, value, traceback): |