Mercurial > public > mercurial-scm > hg
comparison hgext/fastannotate/context.py @ 48946:642e31cb55f0
py3: use class X: instead of class X(object):
The inheritance from object is implied in Python 3. So this should
be equivalent.
This change was generated via an automated search and replace. So there
may have been some accidental changes.
Differential Revision: https://phab.mercurial-scm.org/D12352
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 13:08:28 -0700 |
parents | f254fc73d956 |
children | d44e3c45f0e4 |
comparison
equal
deleted
inserted
replaced
48945:55d132525155 | 48946:642e31cb55f0 |
---|---|
157 | 157 |
158 | 158 |
159 _defaultdiffopthash = hashdiffopts(mdiff.defaultopts) | 159 _defaultdiffopthash = hashdiffopts(mdiff.defaultopts) |
160 | 160 |
161 | 161 |
162 class annotateopts(object): | 162 class annotateopts: |
163 """like mercurial.mdiff.diffopts, but is for annotate | 163 """like mercurial.mdiff.diffopts, but is for annotate |
164 | 164 |
165 followrename: follow renames, like "hg annotate -f" | 165 followrename: follow renames, like "hg annotate -f" |
166 followmerge: follow p2 of a merge changeset, otherwise p2 is ignored | 166 followmerge: follow p2 of a merge changeset, otherwise p2 is ignored |
167 """ | 167 """ |
194 | 194 |
195 | 195 |
196 defaultopts = annotateopts() | 196 defaultopts = annotateopts() |
197 | 197 |
198 | 198 |
199 class _annotatecontext(object): | 199 class _annotatecontext: |
200 """do not use this class directly as it does not use lock to protect | 200 """do not use this class directly as it does not use lock to protect |
201 writes. use "with annotatecontext(...)" instead. | 201 writes. use "with annotatecontext(...)" instead. |
202 """ | 202 """ |
203 | 203 |
204 def __init__(self, repo, path, linelogpath, revmappath, opts): | 204 def __init__(self, repo, path, linelogpath, revmappath, opts): |
781 util.unlink(path) | 781 util.unlink(path) |
782 except OSError: | 782 except OSError: |
783 pass | 783 pass |
784 | 784 |
785 | 785 |
786 class pathhelper(object): | 786 class pathhelper: |
787 """helper for getting paths for lockfile, linelog and revmap""" | 787 """helper for getting paths for lockfile, linelog and revmap""" |
788 | 788 |
789 def __init__(self, repo, path, opts=defaultopts): | 789 def __init__(self, repo, path, opts=defaultopts): |
790 # different options use different directories | 790 # different options use different directories |
791 self._vfspath = os.path.join( | 791 self._vfspath = os.path.join( |