# HG changeset patch # User Benoit Boissinot # Date 1244639421 -7200 # Node ID c5f36402daad090e576e4d6c6252af9a40a9c6e3 # Parent 012be286b2c40be23256b4b1f2e6a0458c4ea2cd use new style classes diff -r 012be286b2c4 -r c5f36402daad hgext/convert/gnuarch.py --- 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 = '' diff -r 012be286b2c4 -r c5f36402daad hgext/convert/subversion.py --- 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 diff -r 012be286b2c4 -r c5f36402daad hgext/convert/transport.py --- 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 diff -r 012be286b2c4 -r c5f36402daad hgext/gpg.py --- 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 "" diff -r 012be286b2c4 -r c5f36402daad hgext/hgcia.py --- 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 diff -r 012be286b2c4 -r c5f36402daad hgext/inotify/__init__.py --- 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) diff -r 012be286b2c4 -r c5f36402daad hgext/mq.py --- 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") diff -r 012be286b2c4 -r c5f36402daad hgext/transplant.py --- 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') diff -r 012be286b2c4 -r c5f36402daad mercurial/archival.py --- 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): diff -r 012be286b2c4 -r c5f36402daad mercurial/changelog.py --- 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): diff -r 012be286b2c4 -r c5f36402daad mercurial/cmdutil.py --- 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 = [] diff -r 012be286b2c4 -r c5f36402daad mercurial/commands.py --- 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) diff -r 012be286b2c4 -r c5f36402daad mercurial/patch.py --- 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 diff -r 012be286b2c4 -r c5f36402daad mercurial/store.py --- 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 diff -r 012be286b2c4 -r c5f36402daad mercurial/util.py --- 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 diff -r 012be286b2c4 -r c5f36402daad mercurial/windows.py --- 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):