[Pkg-bazaar-commits] ./bzr/unstable r558: - All top-level classes inherit from object

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:19:23 UTC 2009


------------------------------------------------------------
revno: 558
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Thu 2005-05-26 12:13:57 +1000
message:
  - All top-level classes inherit from object
    (Python new-style classes)
modified:
  bzrlib/atomicfile.py
  bzrlib/branch.py
  bzrlib/changeset.py
  bzrlib/commands.py
  bzrlib/diff.py
  bzrlib/merge.py
  bzrlib/merge_core.py
  bzrlib/remotebranch.py
  bzrlib/revfile.py
  bzrlib/store.py
  bzrlib/tree.py
-------------- next part --------------
=== modified file 'bzrlib/atomicfile.py'
--- a/bzrlib/atomicfile.py	2005-05-16 02:37:37 +0000
+++ b/bzrlib/atomicfile.py	2005-05-26 02:13:57 +0000
@@ -16,7 +16,7 @@
 
 
 
-class AtomicFile:
+class AtomicFile(object):
     """A file that does an atomic-rename to move into place.
 
     This also causes hardlinks to break when it's written out.

=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2005-05-19 06:37:21 +0000
+++ b/bzrlib/branch.py	2005-05-26 02:13:57 +0000
@@ -80,7 +80,7 @@
 ######################################################################
 # branch objects
 
-class Branch:
+class Branch(object):
     """Branch holding a history of revisions.
 
     base

=== modified file 'bzrlib/changeset.py'
--- a/bzrlib/changeset.py	2005-05-15 02:36:04 +0000
+++ b/bzrlib/changeset.py	2005-05-26 02:13:57 +0000
@@ -32,7 +32,7 @@
     return newdict
 
 
-class PatchApply:
+class PatchApply(object):
     """Patch application as a kind of content change"""
     def __init__(self, contents):
         """Constructor.
@@ -81,7 +81,7 @@
             conflict_handler.failed_hunks(filename)
 
         
-class ChangeUnixPermissions:
+class ChangeUnixPermissions(object):
     """This is two-way change, suitable for file modification, creation,
     deletion"""
     def __init__(self, old_mode, new_mode):
@@ -163,7 +163,7 @@
                 
             
 
-class SymlinkCreate:
+class SymlinkCreate(object):
     """Creates or deletes a symlink (for use with ReplaceContents)"""
     def __init__(self, contents):
         """Constructor.
@@ -202,7 +202,7 @@
     def __ne__(self, other):
         return not (self == other)
 
-class FileCreate:
+class FileCreate(object):
     """Create or delete a file (for use with ReplaceContents)"""
     def __init__(self, contents):
         """Constructor
@@ -265,7 +265,7 @@
     for i in range(len(sequence)):
         yield sequence[max - i]
 
-class ReplaceContents:
+class ReplaceContents(object):
     """A contents-replacement framework.  It allows a file/directory/symlink to
     be created, deleted, or replaced with another file/directory/symlink.
     Arguments must be callable with (filename, reverse).
@@ -332,7 +332,7 @@
             if mode is not None:
                 os.chmod(filename, mode)
 
-class ApplySequence:
+class ApplySequence(object):
     def __init__(self, changes=None):
         self.changes = []
         if changes is not None:
@@ -362,7 +362,7 @@
             change.apply(filename, conflict_handler, reverse)
 
 
-class Diff3Merge:
+class Diff3Merge(object):
     def __init__(self, base_file, other_file):
         self.base_file = base_file
         self.other_file = other_file
@@ -762,7 +762,7 @@
         Exception.__init__(self, msg)
         self.id = id
 
-class Changeset:
+class Changeset(object):
     """A set of changes to apply"""
     def __init__(self):
         self.entries = {}
@@ -1006,7 +1006,7 @@
         Exception.__init__(self, msg)
         self.filename = filename
 
-class ExceptionConflictHandler:
+class ExceptionConflictHandler(object):
     def __init__(self, dir):
         self.dir = dir
     
@@ -1500,7 +1500,7 @@
 
         
     
-class Inventory:
+class Inventory(object):
     def __init__(self, inventory):
         self.inventory = inventory
         self.rinventory = None

=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-05-25 03:54:51 +0000
+++ b/bzrlib/commands.py	2005-05-26 02:13:57 +0000
@@ -66,7 +66,7 @@
     raise BzrCommandError("unknown command %r" % cmd)
 
 
-class Command:
+class Command(object):
     """Base class for commands.
 
     The docstring for an actual command should give a single-line

=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py	2005-05-25 00:48:22 +0000
+++ b/bzrlib/diff.py	2005-05-26 02:13:57 +0000
@@ -140,7 +140,7 @@
 
 
 
-class TreeDelta:
+class TreeDelta(object):
     """Describes changes from one tree to another.
 
     Contains four lists:

=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py	2005-05-15 02:36:04 +0000
+++ b/bzrlib/merge.py	2005-05-26 02:13:57 +0000
@@ -58,7 +58,7 @@
         """Handle the case when the target file or dir exists"""
         self.add_suffix(target, ".moved")
             
-class SourceFile:
+class SourceFile(object):
     def __init__(self, path, id, present=None, isdir=None):
         self.path = path
         self.id = id

=== modified file 'bzrlib/merge_core.py'
--- a/bzrlib/merge_core.py	2005-05-15 02:36:04 +0000
+++ b/bzrlib/merge_core.py	2005-05-26 02:13:57 +0000
@@ -2,7 +2,7 @@
 from changeset import Inventory, apply_changeset, invert_dict
 import os.path
 
-class ThreewayInventory:
+class ThreewayInventory(object):
     def __init__(self, this_inventory, base_inventory, other_inventory):
         self.this = this_inventory
         self.base = base_inventory
@@ -149,7 +149,7 @@
 
     return new_entry
 
-class PermissionsMerge:
+class PermissionsMerge(object):
     def __init__(self, base_path, other_path):
         self.base_path = base_path
         self.other_path = other_path
@@ -177,7 +177,7 @@
 import unittest
 import tempfile
 import shutil
-class MergeTree:
+class MergeTree(object):
     def __init__(self, dir):
         self.dir = dir;
         os.mkdir(dir)
@@ -213,7 +213,7 @@
         os.rename(self.abs_path(self.inventory[id]), self.abs_path(path))
         self.inventory[id] = path
 
-class MergeBuilder:
+class MergeBuilder(object):
     def __init__(self):
         self.dir = tempfile.mkdtemp(prefix="BaZing")
         self.base = MergeTree(os.path.join(self.dir, "base"))

=== modified file 'bzrlib/remotebranch.py'
--- a/bzrlib/remotebranch.py	2005-05-19 09:59:49 +0000
+++ b/bzrlib/remotebranch.py	2005-05-26 02:13:57 +0000
@@ -149,7 +149,7 @@
         return r
 
 
-class RemoteStore:
+class RemoteStore(object):
     def __init__(self, baseurl):
         self._baseurl = baseurl
         

=== modified file 'bzrlib/revfile.py'
--- a/bzrlib/revfile.py	2005-05-03 02:39:45 +0000
+++ b/bzrlib/revfile.py	2005-05-26 02:13:57 +0000
@@ -105,7 +105,7 @@
 class LimitHitException(Exception):
     pass
 
-class Revfile:
+class Revfile(object):
     def __init__(self, basename, mode):
         # TODO: Lock file  while open
 

=== modified file 'bzrlib/store.py'
--- a/bzrlib/store.py	2005-05-16 01:57:48 +0000
+++ b/bzrlib/store.py	2005-05-26 02:13:57 +0000
@@ -34,7 +34,7 @@
     pass
 
 
-class ImmutableStore:
+class ImmutableStore(object):
     """Store that holds files indexed by unique names.
 
     Files can be added, but not modified once they are in.  Typically

=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py	2005-05-19 09:59:49 +0000
+++ b/bzrlib/tree.py	2005-05-26 02:13:57 +0000
@@ -32,7 +32,7 @@
 
 import bzrlib
 
-class Tree:
+class Tree(object):
     """Abstract file tree.
 
     There are several subclasses:



More information about the Pkg-bazaar-commits mailing list