| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 # coding: utf-8 | 1 # coding: utf-8 |
| 2 | 2 |
| 3 # This file is part of the Adblock Plus web scripts, | 3 # This file is part of the Adblock Plus web scripts, |
| 4 # Copyright (C) 2006-2014 Eyeo GmbH | 4 # Copyright (C) 2006-2014 Eyeo GmbH |
| 5 # | 5 # |
| 6 # Adblock Plus is free software: you can redistribute it and/or modify | 6 # Adblock Plus is free software: you can redistribute it and/or modify |
| 7 # it under the terms of the GNU General Public License version 3 as | 7 # it under the terms of the GNU General Public License version 3 as |
| 8 # published by the Free Software Foundation. | 8 # published by the Free Software Foundation. |
| 9 # | 9 # |
| 10 # Adblock Plus is distributed in the hope that it will be useful, | 10 # Adblock Plus is distributed in the hope that it will be useful, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 def copyRepository(self): | 85 def copyRepository(self): |
| 86 ''' | 86 ''' |
| 87 Create a repository copy in a temporary directory | 87 Create a repository copy in a temporary directory |
| 88 ''' | 88 ''' |
| 89 # We cannot use hg archive here due to | 89 # We cannot use hg archive here due to |
| 90 # http://bz.selenic.com/show_bug.cgi?id=3747, have to clone properly :-( | 90 # http://bz.selenic.com/show_bug.cgi?id=3747, have to clone properly :-( |
| 91 self.tempdir = tempfile.mkdtemp(prefix=self.config.repositoryName) | 91 self.tempdir = tempfile.mkdtemp(prefix=self.config.repositoryName) |
| 92 command = ['hg', 'clone', '-q', self.config.repository, '-u', 'default', sel f.tempdir] | 92 command = ['hg', 'clone', '-q', self.config.repository, '-u', 'default', sel f.tempdir] |
| 93 subprocess.check_call(command) | 93 subprocess.check_call(command) |
| 94 | 94 |
| 95 # Make sure to process the dependencies file if it is present | |
| 96 import logging | |
| 97 logging.disable(logging.WARNING) | |
| 98 try: | |
| 99 from buildtools.ensure_dependencies import resolve_deps | |
| 100 resolve_deps(self.tempdir, self_update=False, | |
| 101 overrideroots={"hg": os.path.dirname(self.config.repository)}, | |
| 102 skipdependencies=set(["buildtools"])) | |
|
Sebastian Noack
2014/09/18 16:27:46
We don't support Python 2.6 anymore, right? Then y
Wladimir Palant
2014/09/18 18:18:18
Done.
| |
| 103 finally: | |
| 104 logging.disable(logging.NOTSET) | |
| 105 | |
| 95 def writeChangelog(self, changes): | 106 def writeChangelog(self, changes): |
| 96 """ | 107 """ |
| 97 write the changelog file into the cloned repository | 108 write the changelog file into the cloned repository |
| 98 """ | 109 """ |
| 99 baseDir = os.path.join(self.config.nightliesDirectory, self.basename) | 110 baseDir = os.path.join(self.config.nightliesDirectory, self.basename) |
| 100 if not os.path.exists(baseDir): | 111 if not os.path.exists(baseDir): |
| 101 os.makedirs(baseDir) | 112 os.makedirs(baseDir) |
| 102 changelogFile = "%s-%s.changelog.xhtml" % (self.basename, self.version) | 113 changelogFile = "%s-%s.changelog.xhtml" % (self.basename, self.version) |
| 103 changelogPath = os.path.join(baseDir, changelogFile) | 114 changelogPath = os.path.join(baseDir, changelogFile) |
| 104 self.changelogURL = urlparse.urljoin(self.config.nightliesURL, self.basename + '/' + changelogFile) | 115 self.changelogURL = urlparse.urljoin(self.config.nightliesURL, self.basename + '/' + changelogFile) |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 492 except Exception, ex: | 503 except Exception, ex: |
| 493 print >>sys.stderr, "The build for %s failed:" % repo | 504 print >>sys.stderr, "The build for %s failed:" % repo |
| 494 traceback.print_exc() | 505 traceback.print_exc() |
| 495 | 506 |
| 496 file = open(nightlyConfigFile, 'wb') | 507 file = open(nightlyConfigFile, 'wb') |
| 497 nightlyConfig.write(file) | 508 nightlyConfig.write(file) |
| 498 | 509 |
| 499 | 510 |
| 500 if __name__ == '__main__': | 511 if __name__ == '__main__': |
| 501 main() | 512 main() |
| OLD | NEW |