| Index: sitescripts/extensions/bin/createNightlies.py |
| =================================================================== |
| --- a/sitescripts/extensions/bin/createNightlies.py |
| +++ b/sitescripts/extensions/bin/createNightlies.py |
| @@ -78,18 +78,18 @@ |
| def hasChanges(self): |
| return self.revision != self.previousRevision |
| def getCurrentRevision(self): |
| """ |
| retrieves the current revision ID from the repository |
| """ |
| command = [ |
| - 'hg', 'id', '-i', '-r', 'default', '--config', 'defaults.id=', |
| - self.config.repository |
| + 'hg', 'id', '-i', '-r', self.config.revision, '--config', |
| + 'defaults.id=', self.config.repository |
| ] |
| return subprocess.check_output(command).strip() |
| def getCurrentBuild(self): |
| """ |
| calculates the (typically numerical) build ID for the current build |
| """ |
| command = ['hg', 'id', '-n', '--config', 'defaults.id=', self.tempdir] |
| @@ -98,33 +98,37 @@ |
| build += '-beta' |
| return build |
| def getChanges(self): |
| """ |
| retrieve changes between the current and previous ("first") revision |
| """ |
| - command = ['hg', 'log', '-R', self.tempdir, '-r', 'tip:0', |
| - '-b', 'default', '-l', '50', '--encoding', 'utf-8', |
| - '--template', '{date|isodate}\\0{author|person}\\0{rev}\\0{desc}\\0\\0', |
| - '--config', 'defaults.log='] |
| + command = [ |
| + 'hg', 'log', '-R', self.tempdir, '-r', |
| + 'ancestors({})'.format(self.config.revision), '-l', '50', |
| + '--encoding', 'utf-8', '--template', |
| + '{date|isodate}\\0{author|person}\\0{rev}\\0{desc}\\0\\0', |
| + '--config', 'defaults.log=' |
| + ] |
| result = subprocess.check_output(command).decode('utf-8') |
| for change in result.split('\x00\x00'): |
| if change: |
| date, author, revision, description = change.split('\x00') |
| yield {'date': date, 'author': author, 'revision': revision, 'description': description} |
| def copyRepository(self): |
| """ |
| Create a repository copy in a temporary directory |
| """ |
| self.tempdir = tempfile.mkdtemp(prefix=self.config.repositoryName) |
| - command = ['hg', 'clone', '-q', self.config.repository, '-u', 'default', self.tempdir] |
| + command = ['hg', 'clone', '-q', self.config.repository, '-u', |
| + self.config.revision, self.tempdir] |
| subprocess.check_call(command) |
| # Make sure to run ensure_dependencies.py if present |
| depscript = os.path.join(self.tempdir, 'ensure_dependencies.py') |
| if os.path.isfile(depscript): |
| subprocess.check_call([sys.executable, depscript, '-q']) |
| def writeChangelog(self, changes): |