Rev 380: info -> note as info is deprecated. in http://people.canonical.com/~robertc/baz2.0/plugins/builddeb/trunk
Robert Collins
robertc at robertcollins.net
Wed Nov 11 06:22:50 GMT 2009
At http://people.canonical.com/~robertc/baz2.0/plugins/builddeb/trunk
------------------------------------------------------------
revno: 380
revision-id: robertc at robertcollins.net-20091111062242-bhgyttl9maxo4re5
parent: james.westby at canonical.com-20090916145214-25ton54sm4zkifvv
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Wed 2009-11-11 17:22:42 +1100
message:
info -> note as info is deprecated.
=== modified file 'builder.py'
--- a/builder.py 2009-07-15 20:48:37 +0000
+++ b/builder.py 2009-11-11 06:22:42 +0000
@@ -23,7 +23,7 @@
import subprocess
import os
-from bzrlib.trace import info
+from bzrlib.trace import note
from bzrlib.plugins.builddeb.errors import (
NoSourceDirError,
@@ -69,10 +69,10 @@
os.makedirs(parent_dir)
if os.path.exists(self.target_dir):
if not self.use_existing:
- info("Purging the build dir: %s", self.target_dir)
+ note("Purging the build dir: %s", self.target_dir)
shutil.rmtree(self.target_dir)
else:
- info("Not purging build dir as requested: %s",
+ note("Not purging build dir as requested: %s",
self.target_dir)
else:
if self.use_existing:
@@ -83,7 +83,7 @@
def build(self):
"""This builds the package using the supplied command."""
- info("Building the package in %s, using %s", self.target_dir,
+ note("Building the package in %s, using %s", self.target_dir,
self.builder)
proc = subprocess.Popen(self.builder, shell=True, cwd=self.target_dir,
preexec_fn=subprocess_setup)
@@ -93,5 +93,5 @@
def clean(self):
"""This removes the build directory."""
- info("Cleaning build dir: %s", self.target_dir)
+ note("Cleaning build dir: %s", self.target_dir)
shutil.rmtree(self.target_dir)
=== modified file 'cmds.py'
--- a/cmds.py 2009-09-16 12:47:18 +0000
+++ b/cmds.py 2009-11-11 06:22:42 +0000
@@ -44,7 +44,7 @@
from bzrlib.export import export
from bzrlib.option import Option
from bzrlib.revisionspec import RevisionSpec
-from bzrlib.trace import info, warning
+from bzrlib.trace import note, warning
from bzrlib.workingtree import WorkingTree
from bzrlib.plugins.builddeb import (
@@ -224,7 +224,7 @@
def _get_build_tree(self, revision, tree, branch):
if revision is None and tree is not None:
- info("Building using working tree")
+ note("Building using working tree")
working_tree = True
else:
if revision is None:
@@ -234,7 +234,7 @@
else:
raise BzrCommandError('bzr builddeb --revision takes exactly one '
'revision specifier.')
- info("Building branch from revision %s", revid)
+ note("Building branch from revision %s", revid)
tree = branch.repository.revision_tree(revid)
working_tree = False
return tree, working_tree
@@ -243,20 +243,20 @@
if not merge:
merge = config.merge
if merge:
- info("Running in merge mode")
+ note("Running in merge mode")
native = False
split = False
else:
if not native:
native = config.native
if native:
- info("Running in native mode")
+ note("Running in native mode")
split = False
else:
if not split:
split = config.split
if split:
- info("Running in split mode")
+ note("Running in split mode")
return merge, native, split
def _get_build_command(self, config, builder, quick, build_options):
@@ -368,7 +368,7 @@
try:
config = debuild_config(tree, working_tree, no_user_config)
if reuse:
- info("Reusing existing build dir")
+ note("Reusing existing build dir")
dont_purge = True
use_existing = True
merge, native, split = self._build_type(config, merge, native, split)
@@ -533,11 +533,11 @@
if distribution is None:
distribution = find_last_distribution(changelog)
if distribution is not None:
- info("Using distribution %s" % distribution)
+ note("Using distribution %s" % distribution)
except MissingChangelogError:
current_version = None
if distribution is None:
- info("No distribution specified, and no changelog, "
+ note("No distribution specified, and no changelog, "
"assuming 'debian'")
distribution = "debian"
@@ -581,7 +581,7 @@
version = upstream_branch_version(upstream_branch,
upstream_revision, package,
current_version.upstream_version)
- info("Using version string %s for upstream branch." % (version))
+ note("Using version string %s for upstream branch." % (version))
else:
raise BzrCommandError("You must specify the "
"version number using --version.")
@@ -620,11 +620,11 @@
package)
finally:
tree.unlock()
- info("The new upstream version has been imported.")
+ note("The new upstream version has been imported.")
if conflicts:
- info("You should now resolve the conflicts, review the changes, and then commit.")
+ note("You should now resolve the conflicts, review the changes, and then commit.")
else:
- info("You should now review the changes and then commit.")
+ note("You should now review the changes and then commit.")
class cmd_import_dsc(Command):
@@ -808,16 +808,16 @@
builder.prepare()
run_hook(t, 'pre-export', config)
builder.export()
- info('Running "%s" in the exported directory.' % (command))
+ note('Running "%s" in the exported directory.' % (command))
if give_instruction:
- info('If you want to cancel your changes then exit with a non-zero '
+ note('If you want to cancel your changes then exit with a non-zero '
'exit code, e.g. run "exit 1".')
try:
builder.build()
except BuildFailedError:
raise BzrCommandError('Not updating the working tree as the '
'command failed.')
- info("Copying debian/ back")
+ note("Copying debian/ back")
if larstiq:
destination = ''
else:
@@ -832,7 +832,7 @@
if proc.returncode != 0:
raise BzrCommandError('Copying back debian/ failed')
builder.clean()
- info('If any files were added or removed you should run "bzr add" or '
+ note('If any files were added or removed you should run "bzr add" or '
'"bzr rm" as appropriate.')
@@ -913,10 +913,10 @@
# Merge source packaging branch in to the target packaging branch.
conflicts = tree.merge_from_branch(source_branch)
if conflicts > 0:
- info('The merge resulted in %s conflicts. Please resolve these '
+ note('The merge resulted in %s conflicts. Please resolve these '
'and commit the changes with "bzr commit".' % conflicts)
else:
- info('The merge resulted in no conflicts. You may commit the '
+ note('The merge resulted in no conflicts. You may commit the '
'changes by running "bzr commit".')
=== modified file 'directory.py'
--- a/directory.py 2009-04-16 10:42:12 +0000
+++ b/directory.py 2009-11-11 06:22:42 +0000
@@ -19,7 +19,7 @@
#
from bzrlib import errors
-from bzrlib.trace import info
+from bzrlib.trace import note
import apt_pkg
@@ -61,7 +61,7 @@
raise errors.InvalidURL(path=url,
extra='version %s not found' % version)
- info("Retrieving Vcs locating from %s Debian version %s", name, version)
+ note("Retrieving Vcs locating from %s Debian version %s", name, version)
if "Bzr" in urls[version]:
return urls[version]["Bzr"]
@@ -70,7 +70,7 @@
try:
import bzrlib.plugins.svn
except ImportError:
- info("This package uses subversion. If you would like to "
+ note("This package uses subversion. If you would like to "
"access it with bzr then please install bzr-svn "
"and re-run the command.")
else:
@@ -80,7 +80,7 @@
try:
import bzrlib.plugins.git
except ImportError:
- info("This package uses git. If you would like to "
+ note("This package uses git. If you would like to "
"access it with bzr then please install bzr-git "
"and re-run the command.")
else:
@@ -90,7 +90,7 @@
try:
import bzrlib.plugins.hg
except ImportError:
- info("This package uses hg. If you would like to "
+ note("This package uses hg. If you would like to "
"access it with bzr then please install bzr-hg"
"and re-run the command.")
else:
=== modified file 'hooks.py'
--- a/hooks.py 2008-05-18 00:04:21 +0000
+++ b/hooks.py 2009-11-11 06:22:42 +0000
@@ -20,7 +20,7 @@
import subprocess
-from bzrlib.trace import info
+from bzrlib.trace import note
from bzrlib.plugins.builddeb.errors import HookFailedError
@@ -29,7 +29,7 @@
hook = config.get_hook(hook_name)
if hook is None:
return
- info("Running %s as %s hook" % (hook, hook_name))
+ note("Running %s as %s hook" % (hook, hook_name))
proc = subprocess.Popen(hook, shell=True,
cwd=tree.abspath(wd))
proc.wait()
=== modified file 'import_dsc.py'
--- a/import_dsc.py 2009-09-16 14:52:14 +0000
+++ b/import_dsc.py 2009-11-11 06:22:42 +0000
@@ -59,7 +59,7 @@
from bzrlib.osutils import file_iterator, isdir, basename, splitpath
from bzrlib.revisionspec import RevisionSpec
from bzrlib.revision import NULL_REVISION
-from bzrlib.trace import warning, info, mutter
+from bzrlib.trace import warning, note, mutter
from bzrlib.transform import TreeTransform, cook_conflicts, resolve_conflicts
from bzrlib.transport import (
get_transport,
@@ -1728,7 +1728,7 @@
finally:
tree.unlock()
command = ["/usr/bin/pristine-tar", "gendelta", tarball_path, "-"]
- info(" ".join(command))
+ note(" ".join(command))
proc = Popen(command, stdout=PIPE, cwd=dest)
(stdout, stderr) = proc.communicate()
if proc.returncode != 0:
=== modified file 'upstream.py'
--- a/upstream.py 2009-09-14 15:38:18 +0000
+++ b/upstream.py 2009-11-11 06:22:42 +0000
@@ -28,7 +28,7 @@
from bzrlib.export import export
from bzrlib.revisionspec import RevisionSpec
-from bzrlib.trace import info
+from bzrlib.trace import note
from bzrlib.plugins.builddeb.errors import (
MissingUpstreamTarball,
@@ -83,7 +83,7 @@
revid = db.revid_of_upstream_version_from_branch(version)
if not db.has_pristine_tar_delta(revid):
raise PackageVersionNotPresent(package, version, self)
- info("Using pristine-tar to reconstruct the needed tarball.")
+ note("Using pristine-tar to reconstruct the needed tarball.")
try:
db.reconstruct_pristine_tar(revid, package, version, target_filename)
except PristineTarError:
@@ -109,14 +109,14 @@
raise PackageVersionNotPresent(package, upstream_version, self)
sources.Restart()
- info("Using apt to look for the upstream tarball.")
+ note("Using apt to look for the upstream tarball.")
while sources.Lookup(package):
if upstream_version \
== Version(sources.Version).upstream_version:
if self._run_apt_source(package, sources.Version, target_dir):
return
break
- info("apt could not find the needed tarball.")
+ note("apt could not find the needed tarball.")
raise PackageVersionNotPresent(package, upstream_version, self)
def _get_command(self, package, version_str):
@@ -157,7 +157,7 @@
self.upstream_branch.lock_read()
try:
revid = self._get_revision_id(version)
- info("Exporting upstream branch revision %s to create the tarball",
+ note("Exporting upstream branch revision %s to create the tarball",
revid)
target_filename = self._tarball_path(package, version, target_dir)
tarball_base = "%s-%s" % (package, version)
@@ -176,16 +176,16 @@
def _get_orig_source(self, source_dir, desired_tarball_name,
target_dir):
- info("Trying to use get-orig-source to retrieve needed tarball.")
+ note("Trying to use get-orig-source to retrieve needed tarball.")
command = ["/usr/bin/make", "-f", "debian/rules", "get-orig-source"]
proc = subprocess.Popen(command, cwd=source_dir)
ret = proc.wait()
if ret != 0:
- info("Trying to run get-orig-source rule failed")
+ note("Trying to run get-orig-source rule failed")
return False
fetched_tarball = os.path.join(source_dir, desired_tarball_name)
if not os.path.exists(fetched_tarball):
- info("get-orig-source did not create %s", desired_tarball_name)
+ note("get-orig-source did not create %s", desired_tarball_name)
return False
repack_tarball(fetched_tarball, desired_tarball_name,
target_dir=target_dir)
@@ -213,7 +213,7 @@
return
finally:
shutil.rmtree(tmpdir)
- info("No debian/rules file to try and use for a get-orig-source rule")
+ note("No debian/rules file to try and use for a get-orig-source rule")
raise PackageVersionNotPresent(package, version, self)
@@ -225,14 +225,14 @@
self.larstiq = larstiq
def _uscan(self, package, upstream_version, watch_file, target_dir):
- info("Using uscan to look for the upstream tarball.")
+ note("Using uscan to look for the upstream tarball.")
r = os.system("uscan --upstream-version %s --force-download --rename "
"--package %s --watchfile %s --check-dirname-level 0 "
"--download --repack --destdir %s --download-version %s" %
(upstream_version, package, watch_file, target_dir,
upstream_version))
if r != 0:
- info("uscan could not find the needed tarball.")
+ note("uscan could not find the needed tarball.")
return False
return True
@@ -243,7 +243,7 @@
watchfile = 'debian/watch'
watch_id = self.tree.path2id(watchfile)
if watch_id is None:
- info("No watch file to use to retrieve upstream tarball.")
+ note("No watch file to use to retrieve upstream tarball.")
return None
(tmp, tempfilename) = tempfile.mkstemp()
try:
@@ -287,7 +287,7 @@
shutil.rmtree(tmpdir)
def get_specific_version(self, package, version, target_dir):
- info("Using the current branch without the 'debian' directory "
+ note("Using the current branch without the 'debian' directory "
"to create the tarball")
self._split(package, version,
self._tarball_path(package, version, target_dir))
@@ -387,9 +387,9 @@
:param target_dir: The directory to place the tarball in.
:return: The path to the tarball.
"""
- info("Looking for a way to retrieve the upstream tarball")
+ note("Looking for a way to retrieve the upstream tarball")
if self.already_exists_in_target(target_dir):
- info("Upstream tarball already exists in build directory, "
+ note("Upstream tarball already exists in build directory, "
"using that")
return os.path.join(target_dir, self._tarball_name())
if not self.already_exists_in_store():
@@ -401,7 +401,7 @@
except PackageVersionNotPresent:
raise MissingUpstreamTarball(self._tarball_name())
else:
- info("Using the upstream tarball that is present in "
+ note("Using the upstream tarball that is present in "
"%s" % self.store_dir)
assert self.provide_from_store_dir(target_dir)
return os.path.join(target_dir, self._tarball_name())
More information about the bazaar-commits
mailing list