Merge lp:~savoirfairelinux-openerp/lp-community-utils/fix-pep8-and-add-new-projects into lp:lp-community-utils
- fix-pep8-and-add-new-projects
- Merge into openerp-reviewers-nag
Status: | Merged |
---|---|
Merged at revision: | 19 |
Proposed branch: | lp:~savoirfairelinux-openerp/lp-community-utils/fix-pep8-and-add-new-projects |
Merge into: | lp:lp-community-utils |
Diff against target: |
447 lines (+80/-66) 6 files modified
README.rst (+1/-1) clone_mp_to_community.py (+43/-38) merge_mp.py (+9/-9) openerp-nag (+3/-3) projects (+9/-3) replay_missing.py (+15/-12) |
To merge this branch: | bzr merge lp:~savoirfairelinux-openerp/lp-community-utils/fix-pep8-and-add-new-projects |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stefan Rijnhart (Opener) | code review | Approve | |
Pedro Manuel Baeza | code review, no test | Approve | |
Review via email:
|
Commit message
Description of the change
[FIX] PEP8
[ADD] HR, ISP and Edition projects
To post a comment you must log in.
- 20. By Maxime Chambreuil (http://www.savoirfairelinux.com)
-
[ADD] Bazaar-extractor project
- 21. By Maxime Chambreuil (http://www.savoirfairelinux.com)
-
[IMP] Add openerp-sage-50 project
- 22. By Maxime Chambreuil (http://www.savoirfairelinux.com)
-
[IMP] Add openerp-pos project
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote : | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
Hi, Maxime, can you please add the new openerp-
The rest seems OK.
Thank you.
review:
Approve
(code review, no test)
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Stefan Rijnhart (Opener) (stefan-opener) : | # |
review:
Approve
(code review)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'README.rst' | |||
2 | --- README.rst 2013-01-03 08:17:37 +0000 | |||
3 | +++ README.rst 2013-10-22 12:05:54 +0000 | |||
4 | @@ -43,7 +43,7 @@ | |||
5 | 43 | Community Reviewers pool, it has to be added there. | 43 | Community Reviewers pool, it has to be added there. |
6 | 44 | 44 | ||
7 | 45 | If someone can contribute to automatize the build of | 45 | If someone can contribute to automatize the build of |
9 | 46 | the projects list (if that where possible), | 46 | the projects list (if that were possible), |
10 | 47 | that would be great. | 47 | that would be great. |
11 | 48 | 48 | ||
12 | 49 | 49 | ||
13 | 50 | 50 | ||
14 | === modified file 'clone_mp_to_community.py' | |||
15 | --- clone_mp_to_community.py 2013-04-24 08:13:56 +0000 | |||
16 | +++ clone_mp_to_community.py 2013-10-22 12:05:54 +0000 | |||
17 | @@ -1,6 +1,6 @@ | |||
18 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
19 | 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
21 | 3 | ############################################################################## | 3 | # |
22 | 4 | # | 4 | # |
23 | 5 | # OpenERP, Open Source Management Solution | 5 | # OpenERP, Open Source Management Solution |
24 | 6 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). | 6 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). |
25 | @@ -20,7 +20,7 @@ | |||
26 | 20 | # You should have received a copy of the GNU Affero General Public License | 20 | # You should have received a copy of the GNU Affero General Public License |
27 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
28 | 22 | # | 22 | # |
30 | 23 | ############################################################################## | 23 | # |
31 | 24 | import os | 24 | import os |
32 | 25 | import os.path | 25 | import os.path |
33 | 26 | import shutil | 26 | import shutil |
34 | @@ -41,7 +41,7 @@ | |||
35 | 41 | 41 | ||
36 | 42 | load_plugins() | 42 | load_plugins() |
37 | 43 | 43 | ||
39 | 44 | #mapping from official projects/series to community series | 44 | # mapping from official projects/series to community series |
40 | 45 | project_mappings = { | 45 | project_mappings = { |
41 | 46 | 'openerp-web': { | 46 | 'openerp-web': { |
42 | 47 | '6.1': 'lp:ocb-web/6.1', | 47 | '6.1': 'lp:ocb-web/6.1', |
43 | @@ -61,6 +61,8 @@ | |||
44 | 61 | } | 61 | } |
45 | 62 | 62 | ||
46 | 63 | api_base_url = 'https://api.launchpad.net/1.0/' | 63 | api_base_url = 'https://api.launchpad.net/1.0/' |
47 | 64 | |||
48 | 65 | |||
49 | 64 | def get_lp_json(url): | 66 | def get_lp_json(url): |
50 | 65 | """ | 67 | """ |
51 | 66 | Load a launchpad API request in JSON format. | 68 | Load a launchpad API request in JSON format. |
52 | @@ -90,6 +92,7 @@ | |||
53 | 90 | request = urllib2.urlopen(api_url) | 92 | request = urllib2.urlopen(api_url) |
54 | 91 | return simplejson.load(request) | 93 | return simplejson.load(request) |
55 | 92 | 94 | ||
56 | 95 | |||
57 | 93 | def get_project_series(lp_url): | 96 | def get_project_series(lp_url): |
58 | 94 | """ | 97 | """ |
59 | 95 | Split off the lp: part (or harmlessly 'htt' in the case of http | 98 | Split off the lp: part (or harmlessly 'htt' in the case of http |
60 | @@ -98,6 +101,7 @@ | |||
61 | 98 | parts = lp_url[3:].split('/') | 101 | parts = lp_url[3:].split('/') |
62 | 99 | return (parts[-2], parts[-1]) | 102 | return (parts[-2], parts[-1]) |
63 | 100 | 103 | ||
64 | 104 | |||
65 | 101 | def clone_merge_proposals(lp, source_branch_address, | 105 | def clone_merge_proposals(lp, source_branch_address, |
66 | 102 | target_branch_address=None, | 106 | target_branch_address=None, |
67 | 103 | reference_branch_address=None, | 107 | reference_branch_address=None, |
68 | @@ -126,8 +130,8 @@ | |||
69 | 126 | logging.debug('Looking at possible target %s', | 130 | logging.debug('Looking at possible target %s', |
70 | 127 | mp.target_branch.web_link) | 131 | mp.target_branch.web_link) |
71 | 128 | project, series = get_project_series(mp.target_branch.web_link) | 132 | project, series = get_project_series(mp.target_branch.web_link) |
74 | 129 | if (project in project_mappings and | 133 | if (project in project_mappings and |
75 | 130 | series in project_mappings[project]): | 134 | series in project_mappings[project]): |
76 | 131 | target_branch_address = project_mappings[project][series] | 135 | target_branch_address = project_mappings[project][series] |
77 | 132 | original_target_branch_address = mp.target_branch.bzr_identity | 136 | original_target_branch_address = mp.target_branch.bzr_identity |
78 | 133 | break | 137 | break |
79 | @@ -135,7 +139,7 @@ | |||
80 | 135 | logging.warning('Found a proposal on an unknown project ' | 139 | logging.warning('Found a proposal on an unknown project ' |
81 | 136 | '\'%s\' or series \'%s\'', project, series) | 140 | '\'%s\' or series \'%s\'', project, series) |
82 | 137 | 141 | ||
84 | 138 | if not mp: # i.e. there were no landing targets | 142 | if not mp: # i.e. there were no landing targets |
85 | 139 | logging.error('No merge proposal found for %s', | 143 | logging.error('No merge proposal found for %s', |
86 | 140 | source_branch_address) | 144 | source_branch_address) |
87 | 141 | return 1 | 145 | return 1 |
88 | @@ -153,11 +157,11 @@ | |||
89 | 153 | logging.debug('getting %s to create merge proposal to %s', | 157 | logging.debug('getting %s to create merge proposal to %s', |
90 | 154 | target_branch_address, target_branch_dir) | 158 | target_branch_address, target_branch_dir) |
91 | 155 | cmd_branch().run(target_branch_address, | 159 | cmd_branch().run(target_branch_address, |
93 | 156 | to_location=target_branch_dir, stacked=True, | 160 | to_location=target_branch_dir, stacked=True, |
94 | 157 | use_existing_dir=True) | 161 | use_existing_dir=True) |
95 | 158 | 162 | ||
96 | 159 | target_branch = lp_api.LaunchpadBranch.from_bzr(lp, | 163 | target_branch = lp_api.LaunchpadBranch.from_bzr(lp, |
98 | 160 | Branch.open(target_branch_dir)) | 164 | Branch.open(target_branch_dir)) |
99 | 161 | 165 | ||
100 | 162 | replay_args = [target_branch_dir, source_branch_address] | 166 | replay_args = [target_branch_dir, source_branch_address] |
101 | 163 | if reference_branch_address: | 167 | if reference_branch_address: |
102 | @@ -165,7 +169,7 @@ | |||
103 | 165 | elif original_target_branch_address: | 169 | elif original_target_branch_address: |
104 | 166 | replay_args += ['-r', original_target_branch_address] | 170 | replay_args += ['-r', original_target_branch_address] |
105 | 167 | logging.debug('start replay %s', replay_args) | 171 | logging.debug('start replay %s', replay_args) |
107 | 168 | 172 | ||
108 | 169 | try: | 173 | try: |
109 | 170 | replay_missing.main(replay_args) | 174 | replay_missing.main(replay_args) |
110 | 171 | except ConflictsInTree: | 175 | except ConflictsInTree: |
111 | @@ -188,7 +192,7 @@ | |||
112 | 188 | 192 | ||
113 | 189 | logging.debug('pushing to %s', push_location) | 193 | logging.debug('pushing to %s', push_location) |
114 | 190 | push = cmd_push() | 194 | push = cmd_push() |
116 | 191 | #TODO: because of this, bzr's output doesn't end up in our logger | 195 | # TODO: because of this, bzr's output doesn't end up in our logger |
117 | 192 | push._setup_outf() | 196 | push._setup_outf() |
118 | 193 | push.run( | 197 | push.run( |
119 | 194 | location=push_location, directory=target_branch_dir, stacked=True) | 198 | location=push_location, directory=target_branch_dir, stacked=True) |
120 | @@ -199,10 +203,10 @@ | |||
121 | 199 | initial_comment += (' Below is a copy of the original ' | 203 | initial_comment += (' Below is a copy of the original ' |
122 | 200 | 'description.\n\n%s' % mp.description) | 204 | 'description.\n\n%s' % mp.description) |
123 | 201 | lp.branches.getByUrl(url=push_location).createMergeProposal( | 205 | lp.branches.getByUrl(url=push_location).createMergeProposal( |
128 | 202 | commit_message=mp.commit_message, | 206 | commit_message=mp.commit_message, |
129 | 203 | initial_comment=initial_comment, | 207 | initial_comment=initial_comment, |
130 | 204 | needs_review=True, | 208 | needs_review=True, |
131 | 205 | target_branch=target_branch.lp) | 209 | target_branch=target_branch.lp) |
132 | 206 | 210 | ||
133 | 207 | shutil.rmtree(target_branch_dir) | 211 | shutil.rmtree(target_branch_dir) |
134 | 208 | else: | 212 | else: |
135 | @@ -210,28 +214,28 @@ | |||
136 | 210 | 'No target branch specified and no proposal found for %s ' | 214 | 'No target branch specified and no proposal found for %s ' |
137 | 211 | 'on any mapped project and series', source_branch_address) | 215 | 'on any mapped project and series', source_branch_address) |
138 | 212 | 216 | ||
140 | 213 | 217 | ||
141 | 214 | def main(argv=None): | 218 | def main(argv=None): |
142 | 215 | parser = argparse.ArgumentParser() | 219 | parser = argparse.ArgumentParser() |
153 | 216 | parser.add_argument('--mp-branch-dir', dest='mp_branch_dir', | 220 | parser.add_argument('--mp-branch-dir', dest='mp_branch_dir', |
154 | 217 | help="the local directory of the merge proposal\'s branch") | 221 | help="the local directory of the merge proposal\'s branch") |
155 | 218 | parser.add_argument('--mp-url', dest='mp_url', | 222 | parser.add_argument('--mp-url', dest='mp_url', |
156 | 219 | help="the merge proposal's web address on launchpad") | 223 | help="the merge proposal's web address on launchpad") |
157 | 220 | parser.add_argument('--reference-branch', '-r', dest='reference_branch', | 224 | parser.add_argument('--reference-branch', '-r', dest='reference_branch', |
158 | 221 | help=("Only replay commits that are not present in this branch. This " | 225 | help=("Only replay commits that are not present in this branch. This " |
159 | 222 | "would usually be a local copy of the original target branch " | 226 | "would usually be a local copy of the original target branch " |
160 | 223 | "of the merge proposal")) | 227 | "of the merge proposal")) |
161 | 224 | parser.add_argument('--target-branch', dest='target_branch', | 228 | parser.add_argument('--target-branch', dest='target_branch', |
162 | 225 | help="override automagicly chosen target branch") | 229 | help="override automagicly chosen target branch") |
163 | 226 | parser.add_argument('--target-copy', '-c', | 230 | parser.add_argument('--target-copy', '-c', |
166 | 227 | help="Directory to use as a local copy of the target branch. This " | 231 | help="Directory to use as a local copy of the target branch. This " |
167 | 228 | "prevents downloading the branch from Launchpad.") | 232 | "prevents downloading the branch from Launchpad.") |
168 | 229 | parser.add_argument('-d', '--debug', dest='loglevel', action='store_const', | 233 | parser.add_argument('-d', '--debug', dest='loglevel', action='store_const', |
170 | 230 | const='DEBUG', help='debug output') | 234 | const='DEBUG', help='debug output') |
171 | 231 | parser.add_argument('-q', '--quiet', dest='loglevel', action='store_const', | 235 | parser.add_argument('-q', '--quiet', dest='loglevel', action='store_const', |
173 | 232 | const='ERROR', help='be quiet') | 236 | const='ERROR', help='be quiet') |
174 | 233 | arguments = parser.parse_args(argv) | 237 | arguments = parser.parse_args(argv) |
176 | 234 | 238 | ||
177 | 235 | if arguments.loglevel: | 239 | if arguments.loglevel: |
178 | 236 | logging.getLogger().setLevel(getattr(logging, arguments.loglevel)) | 240 | logging.getLogger().setLevel(getattr(logging, arguments.loglevel)) |
179 | 237 | 241 | ||
180 | @@ -266,15 +270,15 @@ | |||
181 | 266 | except bzrlib.errors.NotBranchError: | 270 | except bzrlib.errors.NotBranchError: |
182 | 267 | if not source_branch_location: | 271 | if not source_branch_location: |
183 | 268 | logging.error('current directory is not a branch and I got no ' | 272 | logging.error('current directory is not a branch and I got no ' |
185 | 269 | 'merge proposal - giving up') | 273 | 'merge proposal - giving up') |
186 | 270 | return 1 | 274 | return 1 |
188 | 271 | 275 | ||
189 | 272 | try: | 276 | try: |
195 | 273 | clone_merge_proposals(lp, source_branch_location, | 277 | clone_merge_proposals(lp, source_branch_location, |
196 | 274 | target_branch_address=arguments.target_branch, | 278 | target_branch_address=arguments.target_branch, |
197 | 275 | reference_branch_address=(arguments.reference_branch | 279 | reference_branch_address=(arguments.reference_branch |
198 | 276 | or original_target_branch_location), | 280 | or original_target_branch_location), |
199 | 277 | target_copy=arguments.target_copy) | 281 | target_copy=arguments.target_copy) |
200 | 278 | 282 | ||
201 | 279 | except bzrlib.errors.NotBranchError as e: | 283 | except bzrlib.errors.NotBranchError as e: |
202 | 280 | logging.error('found no branch to work on - branch dir is %s', | 284 | logging.error('found no branch to work on - branch dir is %s', |
203 | @@ -283,5 +287,6 @@ | |||
204 | 283 | 287 | ||
205 | 284 | if __name__ == "__main__": | 288 | if __name__ == "__main__": |
206 | 285 | import sys | 289 | import sys |
208 | 286 | logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) | 290 | logging.basicConfig( |
209 | 291 | format='%(levelname)s: %(message)s', level=logging.INFO) | ||
210 | 287 | sys.exit(main(sys.argv[1:])) | 292 | sys.exit(main(sys.argv[1:])) |
211 | 288 | 293 | ||
212 | === modified file 'merge_mp.py' | |||
213 | --- merge_mp.py 2013-04-24 08:19:34 +0000 | |||
214 | +++ merge_mp.py 2013-10-22 12:05:54 +0000 | |||
215 | @@ -1,6 +1,6 @@ | |||
216 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
217 | 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
219 | 3 | ############################################################################## | 3 | # |
220 | 4 | # | 4 | # |
221 | 5 | # OpenERP, Open Source Management Solution | 5 | # OpenERP, Open Source Management Solution |
222 | 6 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). | 6 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). |
223 | @@ -20,24 +20,24 @@ | |||
224 | 20 | # You should have received a copy of the GNU Affero General Public License | 20 | # You should have received a copy of the GNU Affero General Public License |
225 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
226 | 22 | # | 22 | # |
228 | 23 | ############################################################################## | 23 | # |
229 | 24 | import sys | 24 | import sys |
230 | 25 | import argparse | 25 | import argparse |
231 | 26 | import tempfile | 26 | import tempfile |
232 | 27 | import shutil | 27 | import shutil |
233 | 28 | import logging | 28 | import logging |
234 | 29 | from bzrlib.builtins import (cmd_branch, cmd_push, cmd_merge, cmd_commit, | 29 | from bzrlib.builtins import (cmd_branch, cmd_push, cmd_merge, cmd_commit, |
236 | 30 | cmd_pull) | 30 | cmd_pull) |
237 | 31 | import clone_mp_to_community | 31 | import clone_mp_to_community |
238 | 32 | 32 | ||
239 | 33 | logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) | 33 | logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) |
240 | 34 | 34 | ||
241 | 35 | parser = argparse.ArgumentParser() | 35 | parser = argparse.ArgumentParser() |
242 | 36 | parser.add_argument('mp_url', | 36 | parser.add_argument('mp_url', |
244 | 37 | help='The URL of the merge proposal on Launchpad') | 37 | help='The URL of the merge proposal on Launchpad') |
245 | 38 | parser.add_argument('--target-copy', '-c', | 38 | parser.add_argument('--target-copy', '-c', |
248 | 39 | help='Directory to use as a local copy of the target branch.\n' | 39 | help='Directory to use as a local copy of the target branch.\n' |
249 | 40 | 'This prevents downloading the branch from Launchpad.') | 40 | 'This prevents downloading the branch from Launchpad.') |
250 | 41 | parser.add_argument('--commit-message', '-m', help='Override commit message') | 41 | parser.add_argument('--commit-message', '-m', help='Override commit message') |
251 | 42 | arguments = parser.parse_args() | 42 | arguments = parser.parse_args() |
252 | 43 | 43 | ||
253 | @@ -47,7 +47,7 @@ | |||
254 | 47 | 47 | ||
255 | 48 | if not mp['commit_message'] and not arguments.commit_message: | 48 | if not mp['commit_message'] and not arguments.commit_message: |
256 | 49 | print 'The merge proposal contains no commit message. '\ | 49 | print 'The merge proposal contains no commit message. '\ |
258 | 50 | 'Give one as parameter!' | 50 | 'Give one as parameter!' |
259 | 51 | sys.exit() | 51 | sys.exit() |
260 | 52 | 52 | ||
261 | 53 | branch_dir = tempfile.mkdtemp() | 53 | branch_dir = tempfile.mkdtemp() |
262 | @@ -60,14 +60,14 @@ | |||
263 | 60 | pull_command.run(directory=branch_dir) | 60 | pull_command.run(directory=branch_dir) |
264 | 61 | else: | 61 | else: |
265 | 62 | cmd_branch().run(lp_target['bzr_identity'], to_location=branch_dir, | 62 | cmd_branch().run(lp_target['bzr_identity'], to_location=branch_dir, |
267 | 63 | stacked=True, use_existing_dir=True) | 63 | stacked=True, use_existing_dir=True) |
268 | 64 | 64 | ||
269 | 65 | merge_command = cmd_merge() | 65 | merge_command = cmd_merge() |
270 | 66 | merge_command._setup_outf() | 66 | merge_command._setup_outf() |
271 | 67 | merge_command.run(lp_source['bzr_identity'], directory=branch_dir) | 67 | merge_command.run(lp_source['bzr_identity'], directory=branch_dir) |
272 | 68 | 68 | ||
273 | 69 | cmd_commit().run(message=arguments.commit_message or mp['commit_message'], | 69 | cmd_commit().run(message=arguments.commit_message or mp['commit_message'], |
275 | 70 | selected_list=[branch_dir]) | 70 | selected_list=[branch_dir]) |
276 | 71 | 71 | ||
277 | 72 | push_command = cmd_push() | 72 | push_command = cmd_push() |
278 | 73 | push_command._setup_outf() | 73 | push_command._setup_outf() |
279 | 74 | 74 | ||
280 | === modified file 'openerp-nag' | |||
281 | --- openerp-nag 2013-06-13 08:00:49 +0000 | |||
282 | +++ openerp-nag 2013-10-22 12:05:54 +0000 | |||
283 | @@ -231,15 +231,15 @@ | |||
284 | 231 | logging.info("Looking for things to nag about under %s", project_name) | 231 | logging.info("Looking for things to nag about under %s", project_name) |
285 | 232 | nags.extend(gen_project_nags(lp, policy, project_name)) | 232 | nags.extend(gen_project_nags(lp, policy, project_name)) |
286 | 233 | nags.sort(key=lambda nag: (nag.sort_class, nag.sort_priority, | 233 | nags.sort(key=lambda nag: (nag.sort_class, nag.sort_priority, |
288 | 234 | nag.sort_age)) | 234 | nag.sort_age)) |
289 | 235 | print("=" * 80) | 235 | print("=" * 80) |
290 | 236 | print("Done thinking, here's the nag list".center(80)) | 236 | print("Done thinking, here's the nag list".center(80)) |
291 | 237 | print("=" * 80) | 237 | print("=" * 80) |
292 | 238 | for index1, nag in enumerate(nags, 1): | 238 | for index1, nag in enumerate(nags, 1): |
293 | 239 | print("{index1:-2}: [age {age}] {person} should {action} {subject} " | 239 | print("{index1:-2}: [age {age}] {person} should {action} {subject} " |
294 | 240 | "on the project {project}".format( | 240 | "on the project {project}".format( |
297 | 241 | index1=index1, age=(nag.sort_age and -nag.sort_age), person=nag.person, | 241 | index1=index1, age=(nag.sort_age and -nag.sort_age), person=nag.person, |
298 | 242 | action=nag.action, subject=nag.subject, project=nag.project_name)) | 242 | action=nag.action, subject=nag.subject, project=nag.project_name)) |
299 | 243 | 243 | ||
300 | 244 | 244 | ||
301 | 245 | if __name__ == "__main__": | 245 | if __name__ == "__main__": |
302 | 246 | 246 | ||
303 | === modified file 'projects' | |||
304 | --- projects 2013-04-29 06:19:10 +0000 | |||
305 | +++ projects 2013-10-22 12:05:54 +0000 | |||
306 | @@ -8,6 +8,7 @@ | |||
307 | 8 | account-invoicing | 8 | account-invoicing |
308 | 9 | account-payment | 9 | account-payment |
309 | 10 | banking-addons | 10 | banking-addons |
310 | 11 | bazaar-extractor | ||
311 | 11 | carriers-deliveries | 12 | carriers-deliveries |
312 | 12 | contract-management | 13 | contract-management |
313 | 13 | department-mgmt | 14 | department-mgmt |
314 | @@ -18,17 +19,25 @@ | |||
315 | 18 | knowledge-addons | 19 | knowledge-addons |
316 | 19 | lp-community-utils | 20 | lp-community-utils |
317 | 20 | margin-analysis | 21 | margin-analysis |
318 | 22 | ocb-addons | ||
319 | 23 | ocb-server | ||
320 | 24 | ocb-web | ||
321 | 21 | oemedical | 25 | oemedical |
322 | 22 | openerp-accountedge | 26 | openerp-accountedge |
323 | 23 | openerp-construction | 27 | openerp-construction |
324 | 28 | openerp-edition | ||
325 | 24 | openerp-fiscal-rules | 29 | openerp-fiscal-rules |
326 | 30 | openerp-hr | ||
327 | 25 | openerp-icm | 31 | openerp-icm |
328 | 32 | openerp-isp | ||
329 | 26 | openerp-library | 33 | openerp-library |
330 | 27 | openerp-lims-connect | 34 | openerp-lims-connect |
331 | 28 | openerp-manufacturing | 35 | openerp-manufacturing |
332 | 29 | openerp-mgmtsystem | 36 | openerp-mgmtsystem |
333 | 37 | openerp-pos | ||
334 | 30 | openerp-product-attributes | 38 | openerp-product-attributes |
335 | 31 | openerp-product-variant | 39 | openerp-product-variant |
336 | 40 | openerp-sage-50 | ||
337 | 32 | partner-contact-management | 41 | partner-contact-management |
338 | 33 | product-kitting | 42 | product-kitting |
339 | 34 | project-reporting | 43 | project-reporting |
340 | @@ -51,6 +60,3 @@ | |||
341 | 51 | sugarcrm-openerp | 60 | sugarcrm-openerp |
342 | 52 | web-addons | 61 | web-addons |
343 | 53 | webkit-utils | 62 | webkit-utils |
344 | 54 | ocb-addons | ||
345 | 55 | ocb-server | ||
346 | 56 | ocb-web | ||
347 | 57 | 63 | ||
348 | === modified file 'replay_missing.py' | |||
349 | --- replay_missing.py 2013-04-24 08:18:30 +0000 | |||
350 | +++ replay_missing.py 2013-10-22 12:05:54 +0000 | |||
351 | @@ -1,6 +1,6 @@ | |||
352 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
353 | 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
355 | 3 | ############################################################################## | 3 | # |
356 | 4 | # | 4 | # |
357 | 5 | # OpenERP, Open Source Management Solution | 5 | # OpenERP, Open Source Management Solution |
358 | 6 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). | 6 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). |
359 | @@ -23,7 +23,7 @@ | |||
360 | 23 | # You should have received a copy of the GNU Affero General Public License | 23 | # You should have received a copy of the GNU Affero General Public License |
361 | 24 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 24 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
362 | 25 | # | 25 | # |
364 | 26 | ############################################################################## | 26 | # |
365 | 27 | import sys | 27 | import sys |
366 | 28 | import argparse | 28 | import argparse |
367 | 29 | from os.path import isdir | 29 | from os.path import isdir |
368 | @@ -33,7 +33,7 @@ | |||
369 | 33 | from bzrlib.errors import ( | 33 | from bzrlib.errors import ( |
370 | 34 | NoSuchRevision, | 34 | NoSuchRevision, |
371 | 35 | UnknownErrorFromSmartServer, | 35 | UnknownErrorFromSmartServer, |
373 | 36 | ) | 36 | ) |
374 | 37 | from bzrlib.generate_ids import gen_revision_id | 37 | from bzrlib.generate_ids import gen_revision_id |
375 | 38 | from bzrlib.option import _parse_revision_str | 38 | from bzrlib.option import _parse_revision_str |
376 | 39 | from bzrlib.plugins.launchpad.lp_directory import LaunchpadDirectory | 39 | from bzrlib.plugins.launchpad.lp_directory import LaunchpadDirectory |
377 | @@ -41,6 +41,7 @@ | |||
378 | 41 | from bzrlib.workingtree import WorkingTree | 41 | from bzrlib.workingtree import WorkingTree |
379 | 42 | import logging | 42 | import logging |
380 | 43 | 43 | ||
381 | 44 | |||
382 | 44 | def replay_missing( | 45 | def replay_missing( |
383 | 45 | wt, upstream_location, alternative_reference=False, do_nothing=False): | 46 | wt, upstream_location, alternative_reference=False, do_nothing=False): |
384 | 46 | """ | 47 | """ |
385 | @@ -101,12 +102,12 @@ | |||
386 | 101 | finally: | 102 | finally: |
387 | 102 | source.unlock() | 103 | source.unlock() |
388 | 103 | return result | 104 | return result |
390 | 104 | 105 | ||
391 | 105 | upstream = Branch.open_containing(upstream_location)[0] | 106 | upstream = Branch.open_containing(upstream_location)[0] |
392 | 106 | logging.debug('finding differences') | 107 | logging.debug('finding differences') |
393 | 107 | _, todo_set = find_difference(wt.branch, upstream) | 108 | _, todo_set = find_difference(wt.branch, upstream) |
394 | 108 | logging.debug("%s revisions not in the reference branch", len(todo_set)) | 109 | logging.debug("%s revisions not in the reference branch", len(todo_set)) |
396 | 109 | 110 | ||
397 | 110 | if alternative_reference: | 111 | if alternative_reference: |
398 | 111 | _, wt_todo_set = find_difference(wt.branch, alternative_reference) | 112 | _, wt_todo_set = find_difference(wt.branch, alternative_reference) |
399 | 112 | todo_set = todo_set.difference(wt_todo_set) | 113 | todo_set = todo_set.difference(wt_todo_set) |
400 | @@ -136,14 +137,15 @@ | |||
401 | 136 | revno, upstream_location, revid) | 137 | revno, upstream_location, revid) |
402 | 137 | if not do_nothing: | 138 | if not do_nothing: |
403 | 138 | revisionspec = _parse_revision_str( | 139 | revisionspec = _parse_revision_str( |
405 | 139 | "%s..%s" % (int(revno) -1, int(revno))) | 140 | "%s..%s" % (int(revno) - 1, int(revno))) |
406 | 140 | cmd_merge().run(location=upstream.base, | 141 | cmd_merge().run(location=upstream.base, |
409 | 141 | revision=revisionspec, | 142 | revision=revisionspec, |
410 | 142 | directory=wt.branch.base) | 143 | directory=wt.branch.base) |
411 | 143 | oldrev = wt.branch.repository.get_revision(revid) | 144 | oldrev = wt.branch.repository.get_revision(revid) |
412 | 144 | revid = gen_revision_id(oldrev.committer, oldrev.timestamp) | 145 | revid = gen_revision_id(oldrev.committer, oldrev.timestamp) |
413 | 145 | commit_missing(wt, oldrev, revid) | 146 | commit_missing(wt, oldrev, revid) |
414 | 146 | 147 | ||
415 | 148 | |||
416 | 147 | def main(argv): | 149 | def main(argv): |
417 | 148 | parser = argparse.ArgumentParser() | 150 | parser = argparse.ArgumentParser() |
418 | 149 | parser.add_argument( | 151 | parser.add_argument( |
419 | @@ -158,7 +160,7 @@ | |||
420 | 158 | help='Log level (default is \'INFO\')') | 160 | help='Log level (default is \'INFO\')') |
421 | 159 | parser.add_argument('wt_directory', help='local branch or checkout') | 161 | parser.add_argument('wt_directory', help='local branch or checkout') |
422 | 160 | parser.add_argument('upstream_branches', nargs='+', | 162 | parser.add_argument('upstream_branches', nargs='+', |
424 | 161 | help='upstream branch', metavar='upstream_branch') | 163 | help='upstream branch', metavar='upstream_branch') |
425 | 162 | 164 | ||
426 | 163 | arguments = parser.parse_args(argv) | 165 | arguments = parser.parse_args(argv) |
427 | 164 | 166 | ||
428 | @@ -173,9 +175,9 @@ | |||
429 | 173 | reference = Branch.open(arguments.reference) | 175 | reference = Branch.open(arguments.reference) |
430 | 174 | if reference.get_master_branch(): | 176 | if reference.get_master_branch(): |
431 | 175 | sys.exit("%s is a bound branch. Please unbind\n" % | 177 | sys.exit("%s is a bound branch. Please unbind\n" % |
433 | 176 | arguments.reference) | 178 | arguments.reference) |
434 | 177 | if isinstance(transport.get_transport(arguments.reference), | 179 | if isinstance(transport.get_transport(arguments.reference), |
436 | 178 | transport.local.LocalTransport): | 180 | transport.local.LocalTransport): |
437 | 179 | logging.debug('pulling %s to %s', | 181 | logging.debug('pulling %s to %s', |
438 | 180 | reference.get_parent(), | 182 | reference.get_parent(), |
439 | 181 | reference.base) | 183 | reference.base) |
440 | @@ -195,5 +197,6 @@ | |||
441 | 195 | do_nothing=arguments.do_nothing) | 197 | do_nothing=arguments.do_nothing) |
442 | 196 | 198 | ||
443 | 197 | if __name__ == "__main__": | 199 | if __name__ == "__main__": |
445 | 198 | logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) | 200 | logging.basicConfig( |
446 | 201 | format='%(levelname)s: %(message)s', level=logging.INFO) | ||
447 | 199 | sys.exit(main(sys.argv[1:])) | 202 | sys.exit(main(sys.argv[1:])) |
Can someone review this MP please ?
Thanks.