Merge lp:~jelmer/bzr-builddeb/no-trace-info into lp:~bzr-builddeb-hackers/bzr-builddeb/trunk-old
- no-trace-info
- Merge into trunk-old
Proposed by
Jelmer Vernooij
Status: | Merged |
---|---|
Merge reported by: | James Westby |
Merged at revision: | not available |
Proposed branch: | lp:~jelmer/bzr-builddeb/no-trace-info |
Merge into: | lp:~bzr-builddeb-hackers/bzr-builddeb/trunk-old |
Diff against target: |
411 lines 6 files modified
builder.py (+5/-5) cmds.py (+19/-19) directory.py (+5/-5) hooks.py (+2/-2) import_dsc.py (+2/-2) upstream.py (+16/-16) |
To merge this branch: | bzr merge lp:~jelmer/bzr-builddeb/no-trace-info |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Westby | Approve | ||
Robert Collins (community) | Approve | ||
Review via email: mp+12587@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote : | # |
Revision history for this message
Robert Collins (lifeless) wrote : | # |
I have a branch doing this and a bit more, too.
review:
Approve
Revision history for this message
James Westby (james-w) wrote : | # |
Looks good. Thanks.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'builder.py' |
2 | --- builder.py 2009-07-15 20:48:37 +0000 |
3 | +++ builder.py 2009-09-29 14:15:20 +0000 |
4 | @@ -23,7 +23,7 @@ |
5 | import subprocess |
6 | import os |
7 | |
8 | -from bzrlib.trace import info |
9 | +from bzrlib.trace import note |
10 | |
11 | from bzrlib.plugins.builddeb.errors import ( |
12 | NoSourceDirError, |
13 | @@ -69,10 +69,10 @@ |
14 | os.makedirs(parent_dir) |
15 | if os.path.exists(self.target_dir): |
16 | if not self.use_existing: |
17 | - info("Purging the build dir: %s", self.target_dir) |
18 | + note("Purging the build dir: %s", self.target_dir) |
19 | shutil.rmtree(self.target_dir) |
20 | else: |
21 | - info("Not purging build dir as requested: %s", |
22 | + note("Not purging build dir as requested: %s", |
23 | self.target_dir) |
24 | else: |
25 | if self.use_existing: |
26 | @@ -83,7 +83,7 @@ |
27 | |
28 | def build(self): |
29 | """This builds the package using the supplied command.""" |
30 | - info("Building the package in %s, using %s", self.target_dir, |
31 | + note("Building the package in %s, using %s", self.target_dir, |
32 | self.builder) |
33 | proc = subprocess.Popen(self.builder, shell=True, cwd=self.target_dir, |
34 | preexec_fn=subprocess_setup) |
35 | @@ -93,5 +93,5 @@ |
36 | |
37 | def clean(self): |
38 | """This removes the build directory.""" |
39 | - info("Cleaning build dir: %s", self.target_dir) |
40 | + note("Cleaning build dir: %s", self.target_dir) |
41 | shutil.rmtree(self.target_dir) |
42 | |
43 | === modified file 'cmds.py' |
44 | --- cmds.py 2009-09-16 12:47:18 +0000 |
45 | +++ cmds.py 2009-09-29 14:15:20 +0000 |
46 | @@ -44,7 +44,7 @@ |
47 | from bzrlib.export import export |
48 | from bzrlib.option import Option |
49 | from bzrlib.revisionspec import RevisionSpec |
50 | -from bzrlib.trace import info, warning |
51 | +from bzrlib.trace import note, warning |
52 | from bzrlib.workingtree import WorkingTree |
53 | |
54 | from bzrlib.plugins.builddeb import ( |
55 | @@ -224,7 +224,7 @@ |
56 | |
57 | def _get_build_tree(self, revision, tree, branch): |
58 | if revision is None and tree is not None: |
59 | - info("Building using working tree") |
60 | + note("Building using working tree") |
61 | working_tree = True |
62 | else: |
63 | if revision is None: |
64 | @@ -234,7 +234,7 @@ |
65 | else: |
66 | raise BzrCommandError('bzr builddeb --revision takes exactly one ' |
67 | 'revision specifier.') |
68 | - info("Building branch from revision %s", revid) |
69 | + note("Building branch from revision %s", revid) |
70 | tree = branch.repository.revision_tree(revid) |
71 | working_tree = False |
72 | return tree, working_tree |
73 | @@ -243,20 +243,20 @@ |
74 | if not merge: |
75 | merge = config.merge |
76 | if merge: |
77 | - info("Running in merge mode") |
78 | + note("Running in merge mode") |
79 | native = False |
80 | split = False |
81 | else: |
82 | if not native: |
83 | native = config.native |
84 | if native: |
85 | - info("Running in native mode") |
86 | + note("Running in native mode") |
87 | split = False |
88 | else: |
89 | if not split: |
90 | split = config.split |
91 | if split: |
92 | - info("Running in split mode") |
93 | + note("Running in split mode") |
94 | return merge, native, split |
95 | |
96 | def _get_build_command(self, config, builder, quick, build_options): |
97 | @@ -368,7 +368,7 @@ |
98 | try: |
99 | config = debuild_config(tree, working_tree, no_user_config) |
100 | if reuse: |
101 | - info("Reusing existing build dir") |
102 | + note("Reusing existing build dir") |
103 | dont_purge = True |
104 | use_existing = True |
105 | merge, native, split = self._build_type(config, merge, native, split) |
106 | @@ -533,11 +533,11 @@ |
107 | if distribution is None: |
108 | distribution = find_last_distribution(changelog) |
109 | if distribution is not None: |
110 | - info("Using distribution %s" % distribution) |
111 | + note("Using distribution %s" % distribution) |
112 | except MissingChangelogError: |
113 | current_version = None |
114 | if distribution is None: |
115 | - info("No distribution specified, and no changelog, " |
116 | + note("No distribution specified, and no changelog, " |
117 | "assuming 'debian'") |
118 | distribution = "debian" |
119 | |
120 | @@ -581,7 +581,7 @@ |
121 | version = upstream_branch_version(upstream_branch, |
122 | upstream_revision, package, |
123 | current_version.upstream_version) |
124 | - info("Using version string %s for upstream branch." % (version)) |
125 | + note("Using version string %s for upstream branch." % (version)) |
126 | else: |
127 | raise BzrCommandError("You must specify the " |
128 | "version number using --version.") |
129 | @@ -620,11 +620,11 @@ |
130 | package) |
131 | finally: |
132 | tree.unlock() |
133 | - info("The new upstream version has been imported.") |
134 | + note("The new upstream version has been imported.") |
135 | if conflicts: |
136 | - info("You should now resolve the conflicts, review the changes, and then commit.") |
137 | + note("You should now resolve the conflicts, review the changes, and then commit.") |
138 | else: |
139 | - info("You should now review the changes and then commit.") |
140 | + note("You should now review the changes and then commit.") |
141 | |
142 | |
143 | class cmd_import_dsc(Command): |
144 | @@ -808,16 +808,16 @@ |
145 | builder.prepare() |
146 | run_hook(t, 'pre-export', config) |
147 | builder.export() |
148 | - info('Running "%s" in the exported directory.' % (command)) |
149 | + note('Running "%s" in the exported directory.' % (command)) |
150 | if give_instruction: |
151 | - info('If you want to cancel your changes then exit with a non-zero ' |
152 | + note('If you want to cancel your changes then exit with a non-zero ' |
153 | 'exit code, e.g. run "exit 1".') |
154 | try: |
155 | builder.build() |
156 | except BuildFailedError: |
157 | raise BzrCommandError('Not updating the working tree as the ' |
158 | 'command failed.') |
159 | - info("Copying debian/ back") |
160 | + note("Copying debian/ back") |
161 | if larstiq: |
162 | destination = '' |
163 | else: |
164 | @@ -832,7 +832,7 @@ |
165 | if proc.returncode != 0: |
166 | raise BzrCommandError('Copying back debian/ failed') |
167 | builder.clean() |
168 | - info('If any files were added or removed you should run "bzr add" or ' |
169 | + note('If any files were added or removed you should run "bzr add" or ' |
170 | '"bzr rm" as appropriate.') |
171 | |
172 | |
173 | @@ -913,10 +913,10 @@ |
174 | # Merge source packaging branch in to the target packaging branch. |
175 | conflicts = tree.merge_from_branch(source_branch) |
176 | if conflicts > 0: |
177 | - info('The merge resulted in %s conflicts. Please resolve these ' |
178 | + note('The merge resulted in %s conflicts. Please resolve these ' |
179 | 'and commit the changes with "bzr commit".' % conflicts) |
180 | else: |
181 | - info('The merge resulted in no conflicts. You may commit the ' |
182 | + note('The merge resulted in no conflicts. You may commit the ' |
183 | 'changes by running "bzr commit".') |
184 | |
185 | |
186 | |
187 | === modified file 'directory.py' |
188 | --- directory.py 2009-04-16 10:42:12 +0000 |
189 | +++ directory.py 2009-09-29 14:15:20 +0000 |
190 | @@ -19,7 +19,7 @@ |
191 | # |
192 | |
193 | from bzrlib import errors |
194 | -from bzrlib.trace import info |
195 | +from bzrlib.trace import note |
196 | |
197 | import apt_pkg |
198 | |
199 | @@ -61,7 +61,7 @@ |
200 | raise errors.InvalidURL(path=url, |
201 | extra='version %s not found' % version) |
202 | |
203 | - info("Retrieving Vcs locating from %s Debian version %s", name, version) |
204 | + note("Retrieving Vcs locating from %s Debian version %s", name, version) |
205 | |
206 | if "Bzr" in urls[version]: |
207 | return urls[version]["Bzr"] |
208 | @@ -70,7 +70,7 @@ |
209 | try: |
210 | import bzrlib.plugins.svn |
211 | except ImportError: |
212 | - info("This package uses subversion. If you would like to " |
213 | + note("This package uses subversion. If you would like to " |
214 | "access it with bzr then please install bzr-svn " |
215 | "and re-run the command.") |
216 | else: |
217 | @@ -80,7 +80,7 @@ |
218 | try: |
219 | import bzrlib.plugins.git |
220 | except ImportError: |
221 | - info("This package uses git. If you would like to " |
222 | + note("This package uses git. If you would like to " |
223 | "access it with bzr then please install bzr-git " |
224 | "and re-run the command.") |
225 | else: |
226 | @@ -90,7 +90,7 @@ |
227 | try: |
228 | import bzrlib.plugins.hg |
229 | except ImportError: |
230 | - info("This package uses hg. If you would like to " |
231 | + note("This package uses hg. If you would like to " |
232 | "access it with bzr then please install bzr-hg" |
233 | "and re-run the command.") |
234 | else: |
235 | |
236 | === modified file 'hooks.py' |
237 | --- hooks.py 2008-05-18 00:04:21 +0000 |
238 | +++ hooks.py 2009-09-29 14:15:20 +0000 |
239 | @@ -20,7 +20,7 @@ |
240 | |
241 | import subprocess |
242 | |
243 | -from bzrlib.trace import info |
244 | +from bzrlib.trace import note |
245 | |
246 | from bzrlib.plugins.builddeb.errors import HookFailedError |
247 | |
248 | @@ -29,7 +29,7 @@ |
249 | hook = config.get_hook(hook_name) |
250 | if hook is None: |
251 | return |
252 | - info("Running %s as %s hook" % (hook, hook_name)) |
253 | + note("Running %s as %s hook" % (hook, hook_name)) |
254 | proc = subprocess.Popen(hook, shell=True, |
255 | cwd=tree.abspath(wd)) |
256 | proc.wait() |
257 | |
258 | === modified file 'import_dsc.py' |
259 | --- import_dsc.py 2009-09-16 14:52:14 +0000 |
260 | +++ import_dsc.py 2009-09-29 14:15:20 +0000 |
261 | @@ -59,7 +59,7 @@ |
262 | from bzrlib.osutils import file_iterator, isdir, basename, splitpath |
263 | from bzrlib.revisionspec import RevisionSpec |
264 | from bzrlib.revision import NULL_REVISION |
265 | -from bzrlib.trace import warning, info, mutter |
266 | +from bzrlib.trace import warning, mutter, note |
267 | from bzrlib.transform import TreeTransform, cook_conflicts, resolve_conflicts |
268 | from bzrlib.transport import ( |
269 | get_transport, |
270 | @@ -1728,7 +1728,7 @@ |
271 | finally: |
272 | tree.unlock() |
273 | command = ["/usr/bin/pristine-tar", "gendelta", tarball_path, "-"] |
274 | - info(" ".join(command)) |
275 | + note(" ".join(command)) |
276 | proc = Popen(command, stdout=PIPE, cwd=dest) |
277 | (stdout, stderr) = proc.communicate() |
278 | if proc.returncode != 0: |
279 | |
280 | === modified file 'upstream.py' |
281 | --- upstream.py 2009-09-14 15:38:18 +0000 |
282 | +++ upstream.py 2009-09-29 14:15:20 +0000 |
283 | @@ -28,7 +28,7 @@ |
284 | |
285 | from bzrlib.export import export |
286 | from bzrlib.revisionspec import RevisionSpec |
287 | -from bzrlib.trace import info |
288 | +from bzrlib.trace import note |
289 | |
290 | from bzrlib.plugins.builddeb.errors import ( |
291 | MissingUpstreamTarball, |
292 | @@ -83,7 +83,7 @@ |
293 | revid = db.revid_of_upstream_version_from_branch(version) |
294 | if not db.has_pristine_tar_delta(revid): |
295 | raise PackageVersionNotPresent(package, version, self) |
296 | - info("Using pristine-tar to reconstruct the needed tarball.") |
297 | + note("Using pristine-tar to reconstruct the needed tarball.") |
298 | try: |
299 | db.reconstruct_pristine_tar(revid, package, version, target_filename) |
300 | except PristineTarError: |
301 | @@ -109,14 +109,14 @@ |
302 | raise PackageVersionNotPresent(package, upstream_version, self) |
303 | |
304 | sources.Restart() |
305 | - info("Using apt to look for the upstream tarball.") |
306 | + note("Using apt to look for the upstream tarball.") |
307 | while sources.Lookup(package): |
308 | if upstream_version \ |
309 | == Version(sources.Version).upstream_version: |
310 | if self._run_apt_source(package, sources.Version, target_dir): |
311 | return |
312 | break |
313 | - info("apt could not find the needed tarball.") |
314 | + note("apt could not find the needed tarball.") |
315 | raise PackageVersionNotPresent(package, upstream_version, self) |
316 | |
317 | def _get_command(self, package, version_str): |
318 | @@ -157,7 +157,7 @@ |
319 | self.upstream_branch.lock_read() |
320 | try: |
321 | revid = self._get_revision_id(version) |
322 | - info("Exporting upstream branch revision %s to create the tarball", |
323 | + note("Exporting upstream branch revision %s to create the tarball", |
324 | revid) |
325 | target_filename = self._tarball_path(package, version, target_dir) |
326 | tarball_base = "%s-%s" % (package, version) |
327 | @@ -176,16 +176,16 @@ |
328 | |
329 | def _get_orig_source(self, source_dir, desired_tarball_name, |
330 | target_dir): |
331 | - info("Trying to use get-orig-source to retrieve needed tarball.") |
332 | + note("Trying to use get-orig-source to retrieve needed tarball.") |
333 | command = ["/usr/bin/make", "-f", "debian/rules", "get-orig-source"] |
334 | proc = subprocess.Popen(command, cwd=source_dir) |
335 | ret = proc.wait() |
336 | if ret != 0: |
337 | - info("Trying to run get-orig-source rule failed") |
338 | + note("Trying to run get-orig-source rule failed") |
339 | return False |
340 | fetched_tarball = os.path.join(source_dir, desired_tarball_name) |
341 | if not os.path.exists(fetched_tarball): |
342 | - info("get-orig-source did not create %s", desired_tarball_name) |
343 | + note("get-orig-source did not create %s", desired_tarball_name) |
344 | return False |
345 | repack_tarball(fetched_tarball, desired_tarball_name, |
346 | target_dir=target_dir) |
347 | @@ -213,7 +213,7 @@ |
348 | return |
349 | finally: |
350 | shutil.rmtree(tmpdir) |
351 | - info("No debian/rules file to try and use for a get-orig-source rule") |
352 | + note("No debian/rules file to try and use for a get-orig-source rule") |
353 | raise PackageVersionNotPresent(package, version, self) |
354 | |
355 | |
356 | @@ -225,14 +225,14 @@ |
357 | self.larstiq = larstiq |
358 | |
359 | def _uscan(self, package, upstream_version, watch_file, target_dir): |
360 | - info("Using uscan to look for the upstream tarball.") |
361 | + note("Using uscan to look for the upstream tarball.") |
362 | r = os.system("uscan --upstream-version %s --force-download --rename " |
363 | "--package %s --watchfile %s --check-dirname-level 0 " |
364 | "--download --repack --destdir %s --download-version %s" % |
365 | (upstream_version, package, watch_file, target_dir, |
366 | upstream_version)) |
367 | if r != 0: |
368 | - info("uscan could not find the needed tarball.") |
369 | + note("uscan could not find the needed tarball.") |
370 | return False |
371 | return True |
372 | |
373 | @@ -243,7 +243,7 @@ |
374 | watchfile = 'debian/watch' |
375 | watch_id = self.tree.path2id(watchfile) |
376 | if watch_id is None: |
377 | - info("No watch file to use to retrieve upstream tarball.") |
378 | + note("No watch file to use to retrieve upstream tarball.") |
379 | return None |
380 | (tmp, tempfilename) = tempfile.mkstemp() |
381 | try: |
382 | @@ -287,7 +287,7 @@ |
383 | shutil.rmtree(tmpdir) |
384 | |
385 | def get_specific_version(self, package, version, target_dir): |
386 | - info("Using the current branch without the 'debian' directory " |
387 | + note("Using the current branch without the 'debian' directory " |
388 | "to create the tarball") |
389 | self._split(package, version, |
390 | self._tarball_path(package, version, target_dir)) |
391 | @@ -387,9 +387,9 @@ |
392 | :param target_dir: The directory to place the tarball in. |
393 | :return: The path to the tarball. |
394 | """ |
395 | - info("Looking for a way to retrieve the upstream tarball") |
396 | + note("Looking for a way to retrieve the upstream tarball") |
397 | if self.already_exists_in_target(target_dir): |
398 | - info("Upstream tarball already exists in build directory, " |
399 | + note("Upstream tarball already exists in build directory, " |
400 | "using that") |
401 | return os.path.join(target_dir, self._tarball_name()) |
402 | if not self.already_exists_in_store(): |
403 | @@ -401,7 +401,7 @@ |
404 | except PackageVersionNotPresent: |
405 | raise MissingUpstreamTarball(self._tarball_name()) |
406 | else: |
407 | - info("Using the upstream tarball that is present in " |
408 | + note("Using the upstream tarball that is present in " |
409 | "%s" % self.store_dir) |
410 | assert self.provide_from_store_dir(target_dir) |
411 | return os.path.join(target_dir, self._tarball_name()) |
This removes the calls to bzrlib. trace.info( ), which is deprecated in bzr 2.1.