Rev 1093: Merge 0.4. in http://people.samba.org/bzr/jelmer/bzr-svn/cext

Jelmer Vernooij jelmer at samba.org
Sun Jun 15 01:41:11 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/cext

------------------------------------------------------------
revno: 1093
revision-id: jelmer at samba.org-20080615004108-td7eely2bfquzfeb
parent: jelmer at samba.org-20080615002300-80825jug3p5sr1wd
parent: jelmer at samba.org-20080610213941-0wcabgvqnvkayz5c
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Sun 2008-06-15 02:41:08 +0200
message:
  Merge 0.4.
modified:
  AUTHORS                        AUTHORS-20060508114718-4c90c0062645106d
  NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
  cache.py                       cache.py-20070520185908-qbtlcet08bllgs0f-1
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
  errors.py                      errors.py-20061226172623-w1sbj8ynpo0eojqp-1
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
  fileids.py                     fileids.py-20060714013623-u5iiyqqnko11grcf-1
  logwalker.py                   logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
  mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
  mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
  parents.py                     parents.py-20080505192113-5rcif033d6wcam9w-1
  revids.py                      revids.py-20070416220458-36vfa0730cchevp1-1
  transport.py                   transport.py-20060406231150-b3472d06b3a0818d
  tree.py                        tree.py-20060624222557-dudlwqcmkf22lt2s-1
  workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
    ------------------------------------------------------------
    revno: 950.3.160
    revision-id: jelmer at samba.org-20080610213941-0wcabgvqnvkayz5c
    parent: jelmer at samba.org-20080608233015-q8mz23n35pg7sbql
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-06-10 23:39:41 +0200
    message:
      Mark as compatible with 1.6.
    modified:
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
    ------------------------------------------------------------
    revno: 950.3.159
    revision-id: jelmer at samba.org-20080608233015-q8mz23n35pg7sbql
    parent: jelmer at samba.org-20080608232527-hxfm1j4jaeyebxhh
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-06-09 01:30:15 +0200
    message:
      Update NEWS, AUTHORS.
    modified:
      AUTHORS                        AUTHORS-20060508114718-4c90c0062645106d
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
    ------------------------------------------------------------
    revno: 950.3.158
    revision-id: jelmer at samba.org-20080608232527-hxfm1j4jaeyebxhh
    parent: jelmer at samba.org-20080606173419-y24f9lfhl7aowj76
    author: Chandler Carruth <chandlerc at gmail.com>
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-06-09 01:25:27 +0200
    message:
      Handling missing branches directory when using webdav.
    modified:
      errors.py                      errors.py-20061226172623-w1sbj8ynpo0eojqp-1
      mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
    ------------------------------------------------------------
    revno: 950.3.157
    revision-id: jelmer at samba.org-20080606173419-y24f9lfhl7aowj76
    parent: martin.vgagern at gmx.net-20080606171953-kbt6y9j5n2w409ph
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Fri 2008-06-06 19:34:19 +0200
    message:
      Add NEWS entry.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
    ------------------------------------------------------------
    revno: 950.3.156
    revision-id: martin.vgagern at gmx.net-20080606171953-kbt6y9j5n2w409ph
    parent: jelmer at samba.org-20080605182131-f211zu91glaq9hp2
    committer: Martin von Gagern <Martin.vGagern at gmx.net>
    branch nick: deferred-formatting
    timestamp: Fri 2008-06-06 19:19:53 +0200
    message:
      More efficient muttering through deferred string formatting.
    modified:
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
      cache.py                       cache.py-20070520185908-qbtlcet08bllgs0f-1
      commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
      fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
      fileids.py                     fileids.py-20060714013623-u5iiyqqnko11grcf-1
      logwalker.py                   logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
      mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
      parents.py                     parents.py-20080505192113-5rcif033d6wcam9w-1
      revids.py                      revids.py-20070416220458-36vfa0730cchevp1-1
      transport.py                   transport.py-20060406231150-b3472d06b3a0818d
      tree.py                        tree.py-20060624222557-dudlwqcmkf22lt2s-1
      workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'AUTHORS'
--- a/AUTHORS	2008-06-02 22:30:52 +0000
+++ b/AUTHORS	2008-06-08 23:30:15 +0000
@@ -11,6 +11,7 @@
 Aaron Bentley
 Max Bowser
 Jerry Carter
+Chandler Carruth
 Robert Collins
 David Foerster
 Mirko Friedenhagen

=== modified file 'NEWS'
--- a/NEWS	2008-06-05 10:23:08 +0000
+++ b/NEWS	2008-06-15 00:41:08 +0000
@@ -14,6 +14,8 @@
 
   BUG FIXES
 
+   * More efficient use of mutter.
+
    * Remember parent branch correctly during sprout. (#237174)
 
    * Raise appropriate errors when using annotate.
@@ -40,6 +42,8 @@
 
    * Fix dealing with strange remove during replace operation. (#232196)
 
+   * Deal with missing branches/tags directories when using webdav. (#235301)
+
 bzr-svn 0.4.10  2008-05-12
 
   CHANGES

=== modified file '__init__.py'
--- a/__init__.py	2008-06-04 18:56:53 +0000
+++ b/__init__.py	2008-06-15 00:41:08 +0000
@@ -39,7 +39,7 @@
     version_string = '%d.%d.%d%s%d' % version_info
 __version__ = version_string
 
-COMPATIBLE_BZR_VERSIONS = [(1, 4), (1, 5)]
+COMPATIBLE_BZR_VERSIONS = [(1, 4), (1, 5), (1, 6)]
 
 def check_bzrlib_version(desired):
     """Check that bzrlib is compatible.
@@ -59,8 +59,8 @@
         raise BzrError('Installed bzr version %s is too old to be used with bzr-svn, at least %s.%s required' % (bzrlib.__version__, desired[0][0], desired[0][1]))
     else:
         warning('bzr-svn is not up to date with installed bzr version %s.'
-                ' \nThere should be a newer version of bzr-svn available.' 
-                % (bzrlib.__version__))
+                ' \nThere should be a newer version of bzr-svn available.',
+                bzrlib.__version__)
         if not (bzrlib_version[0], bzrlib_version[1]-1) in desired:
             raise BzrError('Version mismatch')
 

=== modified file 'cache.py'
--- a/cache.py	2008-04-10 09:34:32 +0000
+++ b/cache.py	2008-06-06 17:19:53 +0000
@@ -87,6 +87,6 @@
     def _create_table(self):
         pass
 
-    def mutter(self, text):
+    def mutter(self, text, *args):
         if "cache" in debug.debug_flags:
-            mutter(text)
+            mutter(text, *args)

=== modified file 'commit.py'
--- a/commit.py	2008-06-14 02:29:20 +0000
+++ b/commit.py	2008-06-15 00:41:08 +0000
@@ -162,9 +162,9 @@
             if old_svk_features != svk_features:
                 self._svnprops[SVN_PROP_SVK_MERGE] = serialize_svk_features(svk_features)
 
-    def mutter(self, text):
+    def mutter(self, text, *args):
         if 'commit' in debug.debug_flags:
-            mutter(text)
+            mutter(text, *args)
 
     def _generate_revision_if_needed(self):
         """See CommitBuilder._generate_revision_if_needed()."""
@@ -224,7 +224,7 @@
                     child_ie.parent_id != self.new_inventory[child_ie.file_id].parent_id or
                     # ... name changed
                     self.new_inventory[child_ie.file_id].name != child_name):
-                    self.mutter('removing %r(%r)' % (child_name, child_ie.file_id))
+                    self.mutter('removing %r(%r)', child_name, child_ie.file_id)
                     dir_editor.delete_entry(
                         urlutils.join(self.branch.get_branch_path(), path, child_name), 
                         self.base_revnum)
@@ -242,16 +242,15 @@
                                   new_child_path)
             # add them if they didn't exist in old_inv 
             if not child_ie.file_id in self.old_inv:
-                self.mutter('adding %s %r' % (child_ie.kind, new_child_path))
+                self.mutter('adding %s %r', child_ie.kind, new_child_path)
                 child_editor = dir_editor.add_file(full_new_child_path)
 
-
             # copy if they existed at different location
             elif (self.old_inv.id2path(child_ie.file_id) != new_child_path or
                     self.old_inv[child_ie.file_id].parent_id != child_ie.parent_id):
-                self.mutter('copy %s %r -> %r' % (child_ie.kind, 
+                self.mutter('copy %s %r -> %r', child_ie.kind, 
                                   self.old_inv.id2path(child_ie.file_id), 
-                                  new_child_path))
+                                  new_child_path)
                 child_editor = dir_editor.add_file(
                         full_new_child_path, 
                     urlutils.join(self.repository.transport.svn_url, self.base_path, self.old_inv.id2path(child_ie.file_id)),
@@ -259,7 +258,7 @@
 
             # open if they existed at the same location
             elif child_ie.revision is None:
-                self.mutter('open %s %r' % (child_ie.kind, new_child_path))
+                self.mutter('open %s %r', child_ie.kind, new_child_path)
 
                 child_editor = dir_editor.open_file(full_new_child_path, self.base_revnum)
 
@@ -308,7 +307,7 @@
             new_child_path = self.new_inventory.id2path(child_ie.file_id)
             # add them if they didn't exist in old_inv 
             if not child_ie.file_id in self.old_inv:
-                self.mutter('adding dir %r' % child_ie.name)
+                self.mutter('adding dir %r', child_ie.name)
                 child_editor = dir_editor.add_directory(
                     urlutils.join(self.branch.get_branch_path(), 
                                   new_child_path))
@@ -316,7 +315,7 @@
             # copy if they existed at different location
             elif self.old_inv.id2path(child_ie.file_id) != new_child_path:
                 old_child_path = self.old_inv.id2path(child_ie.file_id)
-                self.mutter('copy dir %r -> %r' % (old_child_path, new_child_path))
+                self.mutter('copy dir %r -> %r',  old_child_path, new_child_path)
                 child_editor = dir_editor.add_directory(
                     urlutils.join(self.branch.get_branch_path(), new_child_path),
                     urlutils.join(self.repository.transport.svn_url, self.base_path, old_child_path), self.base_revnum)
@@ -324,7 +323,7 @@
             # open if they existed at the same location and 
             # the directory was touched
             elif self.new_inventory[child_ie.file_id].revision is None:
-                self.mutter('open dir %r' % new_child_path)
+                self.mutter('open dir %r', new_child_path)
 
                 child_editor = dir_editor.open_directory(
                         urlutils.join(self.branch.get_branch_path(), new_child_path), 
@@ -352,8 +351,8 @@
         """
         ret = [root]
 
-        self.mutter('opening branch %r (base %r:%r)' % (elements, base_path, 
-                                                   base_rev))
+        self.mutter('opening branch %r (base %r:%r)', elements, base_path, 
+                                                   base_rev)
 
         # Open paths leading up to branch
         for i in range(0, len(elements)-1):
@@ -379,13 +378,13 @@
             if replace_existing:
                 if name == "":
                     raise ChangesRootLHSHistory()
-                self.mutter("removing branch dir %r" % name)
+                self.mutter("removing branch dir %r", name)
                 ret[-1].delete_entry(name, -1)
             if base_path is not None:
                 base_url = urlutils.join(self.repository.transport.svn_url, base_path)
             else:
                 base_url = None
-            self.mutter("adding branch dir %r" % name)
+            self.mutter("adding branch dir %r", name)
             ret.append(ret[-1].add_directory(
                 name, base_url, base_rev))
 
@@ -450,7 +449,7 @@
                                               bp_parts, -1)
             for prop in self._svn_revprops:
                 if not properties.is_valid_property_name(prop):
-                    warning("Setting property %r with invalid characters in name" % prop)
+                    warning("Setting property %r with invalid characters in name", prop)
             conn = self.repository.transport.get_connection()
             try:
                 try:
@@ -492,11 +491,11 @@
                 # Set all the revprops
                 for prop, value in self._svnprops.items():
                     if not properties.is_valid_property_name(prop):
-                        warning("Setting property %r with invalid characters in name" % prop)
+                        warning("Setting property %r with invalid characters in name", prop)
                     if value is not None:
                         value = value.encode('utf-8')
                     branch_editors[-1].change_prop(prop, value)
-                    self.mutter("Setting root file property %r -> %r" % (prop, value))
+                    self.mutter("Setting root file property %r -> %r", prop, value)
 
                 for dir_editor in reversed(branch_editors):
                     dir_editor.close()
@@ -518,9 +517,9 @@
 
         assert self._new_revision_id is None or self._new_revision_id == revid
 
-        self.mutter('commit %d finished. author: %r, date: %r, revid: %r' % 
-               (self.revision_metadata.revision, self.revision_metadata.author, 
-                   self.revision_metadata.date, revid))
+        self.mutter('commit %d finished. author: %r, date: %r, revid: %r',
+               self.revision_metadata.revision, self.revision_metadata.author, 
+                   self.revision_metadata.date, revid)
 
         override_svn_revprops = self._config.get_override_svn_revprops()
         if override_svn_revprops is not None:
@@ -714,7 +713,7 @@
     """
     assert isinstance(source, Branch)
     rev = source.repository.get_revision(revision_id)
-    mutter('pushing %r (%r)' % (revision_id, rev.parent_ids))
+    mutter('pushing %r (%r)', revision_id, rev.parent_ids)
 
     # revision on top of which to commit
     if rev.parent_ids == []:
@@ -769,14 +768,14 @@
             if todo == []:
                 # Nothing to do
                 return
-            mutter("pushing %r into svn" % todo)
+            mutter("pushing %r into svn", todo)
             target_branch = None
             for revision_id in todo:
                 if pb is not None:
                     pb.update("pushing revisions", todo.index(revision_id), len(todo))
                 rev = self.source.get_revision(revision_id)
 
-                mutter('pushing %r' % (revision_id))
+                mutter('pushing %r', revision_id)
 
                 parent_revid = rev.parent_ids[0]
 

=== modified file 'errors.py'
--- a/errors.py	2008-06-05 18:08:34 +0000
+++ b/errors.py	2008-06-15 00:41:08 +0000
@@ -44,6 +44,7 @@
 ERR_RA_LOCAL_REPOS_OPEN_FAILED = 180001
 ERR_BAD_URL = 125002
 ERR_RA_DAV_REQUEST_FAILED = 175002
+ERR_RA_DAV_PATH_NOT_FOUND = 175007
 ERR_FS_NOT_DIRECTORY = 160016
 ERR_FS_NOT_FOUND = 160013
 ERR_FS_ALREADY_EXISTS = 160020

=== modified file 'fetch.py'
--- a/fetch.py	2008-06-05 18:08:34 +0000
+++ b/fetch.py	2008-06-15 00:41:08 +0000
@@ -234,7 +234,7 @@
             if copyfrom_path is None:
                 # This should ideally never happen!
                 copyfrom_path = self.editor.old_inventory.id2path(file_id)
-                mutter('no copyfrom path set, assuming %r' % copyfrom_path)
+                mutter('no copyfrom path set, assuming %r', copyfrom_path)
             assert copyfrom_path == self.editor.old_inventory.id2path(file_id)
             assert copyfrom_path not in self.editor._premature_deletes
             self.editor._premature_deletes.add(copyfrom_path)
@@ -290,7 +290,7 @@
         elif (name.startswith(properties.PROP_WC_PREFIX)):
             pass
         elif name.startswith(properties.PROP_PREFIX):
-            mutter('unsupported dir property %r' % name)
+            mutter('unsupported dir property %r', name)
 
     def add_file(self, path, copyfrom_path=None, copyfrom_revnum=-1):
         assert isinstance(path, str)
@@ -383,7 +383,7 @@
             mutter('svn:externals property on file!')
         elif (name.startswith(properties.PROP_PREFIX) or
               name.startswith(SVN_PROP_BZR_PREFIX)):
-            mutter('unsupported file property %r' % name)
+            mutter('unsupported file property %r', name)
 
     def close(self, checksum=None):
         assert isinstance(self.path, unicode)

=== modified file 'fileids.py'
--- a/fileids.py	2008-06-04 18:56:53 +0000
+++ b/fileids.py	2008-06-15 00:41:08 +0000
@@ -49,7 +49,7 @@
                 # Make it look like the files were added in this revision
                 if get_children is not None:
                     for c in get_children(data[1], data[2]):
-                        mutter('oops: %r child %r' % (data[1], c))
+                        mutter('oops: %r child %r', data[1], c)
                         new_paths[(new_p+"/"+c[len(data[1]):].strip("/")).strip("/")] = (data[0], None, -1)
                 data = (data[0], None, -1)
 
@@ -72,13 +72,13 @@
             map[inv_p] = new_file_id(inv_p)
 
             if data[1] is not None:
-                mutter('%r copied from %r:%s' % (inv_p, data[1], data[2]))
+                mutter('%r copied from %r:%s', inv_p, data[1], data[2])
                 if find_children is not None:
                     for c in find_children(data[1], data[2]):
                         inv_c = c.decode("utf-8")
                         path = c.replace(data[1].decode("utf-8"), inv_p+"/", 1).replace(u"//", u"/")
                         map[path] = new_file_id(path)
-                        mutter('added mapping %r -> %r' % (path, map[path]))
+                        mutter('added mapping %r -> %r', path, map[path])
 
     return map
 
@@ -195,7 +195,7 @@
         self.repos = actual.repos
 
     def save(self, revid, parent_revids, _map):
-        mutter('saving file id map for %r' % revid)
+        mutter('saving file id map for %r', revid)
 
         for path, (id, created_revid)  in _map.items():
             assert isinstance(path, unicode)

=== modified file 'logwalker.py'
--- a/logwalker.py	2008-06-05 18:08:34 +0000
+++ b/logwalker.py	2008-06-15 00:41:08 +0000
@@ -125,7 +125,7 @@
         assert isinstance(revnum, int) and revnum >= 0
         self.fetch_revisions(revnum)
 
-        self.mutter("latest change: %r:%r" % (path, revnum))
+        self.mutter("latest change: %r:%r", path, revnum)
 
         extra = ""
         if path == "":
@@ -161,7 +161,7 @@
 
         revnum = from_revnum
 
-        self.mutter("iter changes %r->%r (%r)" % (from_revnum, to_revnum, paths))
+        self.mutter("iter changes %r->%r (%r)", from_revnum, to_revnum, paths)
 
         if paths is None:
             path = ""
@@ -211,7 +211,7 @@
         """
         assert revnum >= 0
         self.fetch_revisions(revnum)
-        self.mutter("get previous %r:%r" % (path, revnum))
+        self.mutter("get previous %r:%r", path, revnum)
         if revnum == 0:
             return (None, -1)
         row = self.cachedb.execute("select action, copyfrom_path, copyfrom_rev from changed_path where path='%s' and rev=%d" % (path, revnum)).fetchone()
@@ -245,7 +245,7 @@
         :returns: dictionary with paths as keys and 
                   (action, copyfrom_path, copyfrom_rev) as values.
         """
-        self.mutter("revision paths: %r" % revnum)
+        self.mutter("revision paths: %r", revnum)
 
         return self._get_revision_paths(revnum)
 

=== modified file 'mapping.py'
--- a/mapping.py	2008-06-05 18:08:34 +0000
+++ b/mapping.py	2008-06-15 00:41:08 +0000
@@ -131,7 +131,7 @@
     :return: List of revisions merged
     """
     if ' ' in line:
-        mutter('invalid revision id %r in merged property, skipping' % line)
+        mutter('invalid revision id %r in merged property, skipping', line)
         return ()
 
     return tuple(filter(lambda x: x != "", line.split("\t")))

=== modified file 'mapping3/__init__.py'
--- a/mapping3/__init__.py	2008-06-14 02:29:20 +0000
+++ b/mapping3/__init__.py	2008-06-15 00:41:08 +0000
@@ -16,9 +16,10 @@
 from bzrlib import osutils, ui
 from bzrlib.errors import InvalidRevisionId
 from bzrlib.trace import mutter
+
 from bzrlib.plugins.svn import core, mapping, properties
 from bzrlib.plugins.svn.core import SubversionException
-from bzrlib.plugins.svn.errors import ERR_FS_NOT_DIRECTORY, ERR_FS_NOT_FOUND
+from bzrlib.plugins.svn.errors import ERR_FS_NOT_DIRECTORY, ERR_FS_NOT_FOUND, ERR_RA_DAV_PATH_NOT_FOUND
 from bzrlib.plugins.svn.layout import RepositoryLayout
 from bzrlib.plugins.svn.mapping3.scheme import (BranchingScheme, guess_scheme_from_branch_path, 
                              guess_scheme_from_history, ListBranchingScheme, 
@@ -73,9 +74,7 @@
                 assert not path.startswith("/")
                 dirents = self.repository.transport.get_dir(path, revnum)[0]
             except SubversionException, (msg, num):
-                if num == ERR_FS_NOT_DIRECTORY:
-                    return None
-                if num == ERR_FS_NOT_FOUND:
+                if num in (ERR_FS_NOT_DIRECTORY, ERR_FS_NOT_FOUND, ERR_RA_DAV_PATH_NOT_FOUND):
                     return None
                 raise
             return dirents.keys()

=== modified file 'parents.py'
--- a/parents.py	2008-06-04 15:20:12 +0000
+++ b/parents.py	2008-06-06 17:19:53 +0000
@@ -42,12 +42,12 @@
         """)
 
     def insert_parents(self, revid, parents):
-        self.mutter('insert parents: %r -> %r' % (revid, parents))
+        self.mutter('insert parents: %r -> %r', revid, parents)
         for parent in parents:
             self.cachedb.execute("insert into parent (revision, parent) VALUES (?, ?)", (revid, parent))
 
     def lookup_parents(self, revid):
-        self.mutter('lookup parents: %r' % (revid,))
+        self.mutter('lookup parents: %r', revid)
         ret = []
         for row in self.cachedb.execute("select parent from parent where revision = ?", (revid,)).fetchall():
             ret.append(row[0])

=== modified file 'revids.py'
--- a/revids.py	2008-06-05 18:08:34 +0000
+++ b/revids.py	2008-06-15 00:41:08 +0000
@@ -217,7 +217,7 @@
         :param layout: Repository layout.
         :return: Last revision number checked or 0.
         """
-        self.mutter("last revnum checked %r" % layout)
+        self.mutter("last revnum checked %r", layout)
         ret = self.cachedb.execute(
             "select max_revnum from revids_seen where scheme = ?", (layout,)).fetchone()
         if ret is None:
@@ -232,7 +232,7 @@
             branching scheme.
         """
         assert isinstance(revid, str)
-        self.mutter("lookup revid %r" % revid)
+        self.mutter("lookup revid %r", revid)
         ret = self.cachedb.execute(
             "select path, min_revnum, max_revnum, scheme from revmap where revid='%s'" % revid).fetchone()
         if ret is None:
@@ -246,7 +246,7 @@
         :param path: Subversion branch path.
         :param scheme: Branching scheme name
         """
-        self.mutter("lookup branch,revnum %r:%r" % (path, revnum))
+        self.mutter("lookup branch,revnum %r:%r", path, revnum)
         assert isinstance(revnum, int)
         assert isinstance(path, str)
         assert isinstance(scheme, str)
@@ -272,7 +272,7 @@
         assert isinstance(scheme, str)
         assert isinstance(branch, str)
         assert isinstance(min_revnum, int) and isinstance(max_revnum, int)
-        self.mutter("insert revid %r:%r-%r -> %r" % (branch, min_revnum, max_revnum, revid))
+        self.mutter("insert revid %r:%r-%r -> %r", branch, min_revnum, max_revnum, revid)
         cursor = self.cachedb.execute(
             "update revmap set min_revnum = MAX(min_revnum,?), max_revnum = MIN(max_revnum, ?) WHERE revid=? AND path=? AND scheme=?",
             (min_revnum, max_revnum, revid, branch, scheme))

=== modified file 'transport.py'
--- a/transport.py	2008-06-14 02:29:20 +0000
+++ b/transport.py	2008-06-15 00:41:08 +0000
@@ -319,9 +319,9 @@
         finally:
             self.add_connection(conn)
 
-    def mutter(self, text):
+    def mutter(self, text, *args):
         if 'transport' in debug.debug_flags:
-            mutter(text)
+            mutter(text, *args)
 
     def _request_path(self, relpath):
         if self._backing_url == self.svn_url:
@@ -330,7 +330,7 @@
         if newsvnurl == self._backing_url:
             return ""
         newrelpath = urlutils.relative_url(self._backing_url+"/", newsvnurl+"/").strip("/")
-        self.mutter('request path %r -> %r' % (relpath, newrelpath))
+        self.mutter('request path %r -> %r', relpath, newrelpath)
         return newrelpath
 
     def list_dir(self, relpath):

=== modified file 'tree.py'
--- a/tree.py	2008-06-05 18:08:34 +0000
+++ b/tree.py	2008-06-15 00:41:08 +0000
@@ -168,7 +168,7 @@
         elif name.startswith(properties.PROP_WC_PREFIX):
             pass
         elif name.startswith(properties.PROP_PREFIX):
-            mutter('unsupported dir property %r' % name)
+            mutter('unsupported dir property %r', name)
 
     def add_file(self, path, copyfrom_path=None, copyfrom_revnum=-1):
         path = path.decode("utf-8")
@@ -194,7 +194,7 @@
         elif name == properties.PROP_SPECIAL:
             self.is_symlink = (value != None)
         elif name == properties.PROP_EXTERNALS:
-            mutter('%r property on file!' % name)
+            mutter('%r property on file!', name)
         elif name == properties.PROP_ENTRY_COMMITTED_REV:
             self.last_file_rev = int(value)
         elif name in (properties.PROP_ENTRY_COMMITTED_DATE,
@@ -205,8 +205,8 @@
             pass
         elif name.startswith(properties.PROP_WC_PREFIX):
             pass
-        elif name.startswith(properties.SVN_PROP_PREFIX):
-            mutter('unsupported file property %r' % name)
+        elif name.startswith(properties.PROP_PREFIX):
+            mutter('unsupported file property %r', name)
 
     def close(self, checksum=None):
         file_id, revision_id = self.tree.id_map[self.path]

=== modified file 'workingtree.py'
--- a/workingtree.py	2008-06-05 18:08:34 +0000
+++ b/workingtree.py	2008-06-15 00:41:08 +0000
@@ -326,7 +326,7 @@
                     "%r is not a string" % parent_id
             (id, revid) = find_ids(entry, rootwc)
             if id is None:
-                mutter('no id for %r' % entry.url)
+                mutter('no id for %r', entry.url)
                 return
             assert revid is None or isinstance(revid, str), "%r is not a string" % revid
             assert isinstance(id, str), "%r is not a string" % id
@@ -356,7 +356,7 @@
                     if subid:
                         add_file_to_inv(subrelpath, subid, subrevid, id)
                     else:
-                        mutter('no id for %r' % entry.url)
+                        mutter('no id for %r', entry.url)
 
         rootwc = self._get_wc() 
         try:
@@ -368,7 +368,7 @@
         return inv
 
     def set_last_revision(self, revid):
-        mutter('setting last revision to %r' % revid)
+        mutter('setting last revision to %r', revid)
         if revid is None or revid == NULL_REVISION:
             self.base_revid = revid
             self.base_revnum = 0
@@ -386,7 +386,7 @@
 
         def update_settings(adm, path):
             id = newrevtree.inventory.path2id(path)
-            mutter("Updating settings for %r" % id)
+            mutter("Updating settings for %r", id)
             revnum = self.branch.lookup_revision_id(
                     newrevtree.inventory[id].revision)
 
@@ -436,7 +436,7 @@
             try:
                 if not self.inventory.has_filename(f):
                     if save:
-                        mutter('adding %r' % file_path)
+                        mutter('adding %r', file_path)
                         adm.add(file_path, None, 0, None, None, None)
                     added.append(file_path)
                 if recurse and osutils.file_kind(file_path) == 'directory':




More information about the bazaar-commits mailing list