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): |
Vasily Kuznetsov
2017/04/03 09:55:08
Perhaps add a default value 'default' in case some
Jon Sonesen
2017/04/03 10:10:59
It is not used anywhere else, as verified by grep
Sebastian Noack
2017/04/03 10:18:49
That is the same conclusion to which I came. When
Vasily Kuznetsov
2017/04/03 10:33:02
I was thinking about possible future uses, but it'
|
+ 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): |