OLD | NEW |
1 # This file is part of the Adblock Plus web scripts, | 1 # This file is part of the Adblock Plus web scripts, |
2 # Copyright (C) 2006-2016 Eyeo GmbH | 2 # Copyright (C) 2006-2016 Eyeo GmbH |
3 # | 3 # |
4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
7 # | 7 # |
8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 command = ['hg', 'id', '-n', '--config', 'defaults.id=', self.tempdir] | 95 command = ['hg', 'id', '-n', '--config', 'defaults.id=', self.tempdir] |
96 build = subprocess.check_output(command).strip() | 96 build = subprocess.check_output(command).strip() |
97 if self.config.type == 'gecko': | 97 if self.config.type == 'gecko': |
98 build += '-beta' | 98 build += '-beta' |
99 return build | 99 return build |
100 | 100 |
101 def getChanges(self): | 101 def getChanges(self): |
102 """ | 102 """ |
103 retrieve changes between the current and previous ("first") revision | 103 retrieve changes between the current and previous ("first") revision |
104 """ | 104 """ |
105 | |
106 command = [ | 105 command = [ |
107 'hg', 'log', '-R', self.tempdir, '-r', | 106 'hg', 'log', '-R', self.tempdir, '-r', |
108 'ancestors({})'.format(self.config.revision), '-l', '50', | 107 'reverse(ancestors({}))'.format(self.config.revision), '-l', '50', |
109 '--encoding', 'utf-8', '--template', | 108 '--encoding', 'utf-8', '--template', |
110 '{date|isodate}\\0{author|person}\\0{rev}\\0{desc}\\0\\0', | 109 '{date|isodate}\\0{author|person}\\0{rev}\\0{desc}\\0\\0', |
111 '--config', 'defaults.log=' | 110 '--config', 'defaults.log=' |
112 ] | 111 ] |
113 result = subprocess.check_output(command).decode('utf-8') | 112 result = subprocess.check_output(command).decode('utf-8') |
114 | 113 |
115 for change in result.split('\x00\x00'): | 114 for change in result.split('\x00\x00'): |
116 if change: | 115 if change: |
117 date, author, revision, description = change.split('\x00') | 116 date, author, revision, description = change.split('\x00') |
118 yield {'date': date, 'author': author, 'revision': revision, 'de
scription': description} | 117 yield {'date': date, 'author': author, 'revision': revision, 'de
scription': description} |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 except Exception as ex: | 584 except Exception as ex: |
586 logging.error('The build for %s failed:', repo) | 585 logging.error('The build for %s failed:', repo) |
587 logging.exception(ex) | 586 logging.exception(ex) |
588 | 587 |
589 file = open(nightlyConfigFile, 'wb') | 588 file = open(nightlyConfigFile, 'wb') |
590 nightlyConfig.write(file) | 589 nightlyConfig.write(file) |
591 | 590 |
592 | 591 |
593 if __name__ == '__main__': | 592 if __name__ == '__main__': |
594 main() | 593 main() |
OLD | NEW |