changeset 8778:c5f36402daad

use new style classes
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 10 Jun 2009 15:10:21 +0200
parents 012be286b2c4
children 708938509732
files hgext/convert/gnuarch.py hgext/convert/subversion.py hgext/convert/transport.py hgext/gpg.py hgext/hgcia.py hgext/inotify/__init__.py hgext/mq.py hgext/transplant.py mercurial/archival.py mercurial/changelog.py mercurial/cmdutil.py mercurial/commands.py mercurial/patch.py mercurial/store.py mercurial/util.py mercurial/windows.py
diffstat 16 files changed, 25 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/gnuarch.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/hgext/convert/gnuarch.py	Wed Jun 10 15:10:21 2009 +0200
@@ -14,7 +14,7 @@
 
 class gnuarch_source(converter_source, commandline):
 
-    class gnuarch_rev:
+    class gnuarch_rev(object):
         def __init__(self, rev):
             self.rev = rev
             self.summary = ''
--- a/hgext/convert/subversion.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/hgext/convert/subversion.py	Wed Jun 10 15:10:21 2009 +0200
@@ -118,7 +118,7 @@
     args = decodeargs(sys.stdin.read())
     get_log_child(sys.stdout, *args)
 
-class logstream:
+class logstream(object):
     """Interruptible revision log iterator."""
     def __init__(self, stdout):
         self._stdout = stdout
--- a/hgext/convert/transport.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/hgext/convert/transport.py	Wed Jun 10 15:10:21 2009 +0200
@@ -97,7 +97,7 @@
             self.ra = ra
             svn.ra.reparent(self.ra, self.svn_url.encode('utf8'))
 
-    class Reporter:
+    class Reporter(object):
         def __init__(self, (reporter, report_baton)):
             self._reporter = reporter
             self._baton = report_baton
--- a/hgext/gpg.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/hgext/gpg.py	Wed Jun 10 15:10:21 2009 +0200
@@ -10,7 +10,7 @@
 from mercurial import node as hgnode
 from mercurial.i18n import _
 
-class gpg:
+class gpg(object):
     def __init__(self, path, key=None):
         self.path = path
         self.key = (key and " --local-user \"%s\"" % key) or ""
--- a/hgext/hgcia.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/hgext/hgcia.py	Wed Jun 10 15:10:21 2009 +0200
@@ -99,7 +99,7 @@
         return '\n'.join(msg)
 
     def diffstat(self):
-        class patchbuf:
+        class patchbuf(object):
             def __init__(self):
                 self.lines = []
                 # diffstat is stupid
--- a/hgext/inotify/__init__.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/hgext/inotify/__init__.py	Wed Jun 10 15:10:21 2009 +0200
@@ -23,7 +23,7 @@
     if timeout:
         timeout = float(timeout) * 1e3
 
-    class service:
+    class service(object):
         def init(self):
             try:
                 self.master = server.master(ui, repo, timeout)
--- a/hgext/mq.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/hgext/mq.py	Wed Jun 10 15:10:21 2009 +0200
@@ -42,7 +42,7 @@
 # They must be joinable with queue directory and result in the patch path.
 normname = util.normpath
 
-class statusentry:
+class statusentry(object):
     def __init__(self, rev, name=None):
         if not name:
             fields = rev.split(':', 1)
@@ -191,7 +191,7 @@
                 ci += 1
             del self.comments[ci]
 
-class queue:
+class queue(object):
     def __init__(self, ui, path, patchdir=None):
         self.basepath = path
         self.path = patchdir or os.path.join(path, "patches")
--- a/hgext/transplant.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/hgext/transplant.py	Wed Jun 10 15:10:21 2009 +0200
@@ -18,12 +18,12 @@
 from mercurial import bundlerepo, changegroup, cmdutil, hg, merge, match
 from mercurial import patch, revlog, util, error
 
-class transplantentry:
+class transplantentry(object):
     def __init__(self, lnode, rnode):
         self.lnode = lnode
         self.rnode = rnode
 
-class transplants:
+class transplants(object):
     def __init__(self, path=None, transplantfile=None, opener=None):
         self.path = path
         self.transplantfile = transplantfile
@@ -64,7 +64,7 @@
         del self.transplants[self.transplants.index(transplant)]
         self.dirty = True
 
-class transplanter:
+class transplanter(object):
     def __init__(self, ui, repo):
         self.ui = ui
         self.path = repo.join('transplant')
--- a/mercurial/archival.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/mercurial/archival.py	Wed Jun 10 15:10:21 2009 +0200
@@ -34,7 +34,7 @@
         raise util.Abort(_('archive prefix contains illegal components'))
     return prefix
 
-class tarit:
+class tarit(object):
     '''write archive to tar file or stream.  can write uncompressed,
     or compress with gzip or bzip2.'''
 
@@ -106,7 +106,7 @@
     def done(self):
         self.z.close()
 
-class tellable:
+class tellable(object):
     '''provide tell method for zipfile.ZipFile when writing to http
     response file object.'''
 
@@ -124,7 +124,7 @@
     def tell(self):
         return self.offset
 
-class zipit:
+class zipit(object):
     '''write archive to zip file or stream.  can write uncompressed,
     or compressed with deflate.'''
 
@@ -156,7 +156,7 @@
     def done(self):
         self.z.close()
 
-class fileit:
+class fileit(object):
     '''write archive as files in directory.'''
 
     def __init__(self, name, prefix, mtime):
--- a/mercurial/changelog.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/mercurial/changelog.py	Wed Jun 10 15:10:21 2009 +0200
@@ -36,7 +36,7 @@
     items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)]
     return "\0".join(items)
 
-class appender:
+class appender(object):
     '''the changelog index must be updated last on disk, so we use this class
     to delay writes to it'''
     def __init__(self, fp, buf):
--- a/mercurial/cmdutil.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/mercurial/cmdutil.py	Wed Jun 10 15:10:21 2009 +0200
@@ -1110,7 +1110,7 @@
                 fncache[rev] = matches
                 wanted.add(rev)
 
-    class followfilter:
+    class followfilter(object):
         def __init__(self, onlyfirst=False):
             self.startrev = nullrev
             self.roots = []
--- a/mercurial/commands.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/mercurial/commands.py	Wed Jun 10 15:10:21 2009 +0200
@@ -2697,7 +2697,7 @@
         raise error.RepoError(_("There is no Mercurial repository here"
                                 " (.hg not found)"))
 
-    class service:
+    class service(object):
         def init(self):
             util.set_signal_handler()
             self.httpd = server.create_server(baseui, repo)
--- a/mercurial/patch.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/mercurial/patch.py	Wed Jun 10 15:10:21 2009 +0200
@@ -147,7 +147,7 @@
 GP_FILTER = 1 << 1  # there's some copy/rename operation
 GP_BINARY = 1 << 2  # there's a binary patch
 
-class patchmeta:
+class patchmeta(object):
     """Patched file metadata
 
     'op' is the performed operation within ADD, DELETE, RENAME, MODIFY
@@ -232,7 +232,7 @@
 unidesc = re.compile('@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@')
 contextdesc = re.compile('(---|\*\*\*) (\d+)(,(\d+))? (---|\*\*\*)')
 
-class patchfile:
+class patchfile(object):
     def __init__(self, ui, fname, opener, missing=False):
         self.fname = fname
         self.opener = opener
@@ -432,7 +432,7 @@
         self.rej.append(h)
         return -1
 
-class hunk:
+class hunk(object):
     def __init__(self, desc, num, lr, context, create=False, remove=False):
         self.number = num
         self.desc = desc
@@ -782,7 +782,7 @@
 
     return fname, missing
 
-class linereader:
+class linereader(object):
     # simple class to allow pushing lines back into the input stream
     def __init__(self, fp):
         self.fp = fp
--- a/mercurial/store.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/mercurial/store.py	Wed Jun 10 15:10:21 2009 +0200
@@ -165,7 +165,7 @@
 
 _data = 'data 00manifest.d 00manifest.i 00changelog.d  00changelog.i'
 
-class basicstore:
+class basicstore(object):
     '''base class for local repository stores'''
     def __init__(self, path, opener, pathjoiner):
         self.pathjoiner = pathjoiner
--- a/mercurial/util.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/mercurial/util.py	Wed Jun 10 15:10:21 2009 +0200
@@ -749,7 +749,7 @@
         raise
     return temp
 
-class atomictempfile:
+class atomictempfile(object):
     """file-like object that atomically updates a file
 
     All writes will be redirected to a temporary copy of the original
--- a/mercurial/windows.py	Wed Jun 10 03:20:20 2009 +0200
+++ b/mercurial/windows.py	Wed Jun 10 15:10:21 2009 +0200
@@ -20,7 +20,7 @@
         raise WinIOError(err)
 posixfile.__doc__ = osutil.posixfile.__doc__
 
-class winstdout:
+class winstdout(object):
     '''stdout on windows misbehaves if sent through a pipe'''
 
     def __init__(self, fp):