comparison mercurial/repoview.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 6000f5b25c9b
children d44e3c45f0e4
comparison
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
259 cl.__class__ = filteredchangelog 259 cl.__class__ = filteredchangelog
260 260
261 return cl 261 return cl
262 262
263 263
264 class filteredchangelogmixin(object): 264 class filteredchangelogmixin:
265 def tiprev(self): 265 def tiprev(self):
266 """filtered version of revlog.tiprev""" 266 """filtered version of revlog.tiprev"""
267 for i in pycompat.xrange(len(self) - 1, -2, -1): 267 for i in pycompat.xrange(len(self) - 1, -2, -1):
268 if i not in self.filteredrevs: 268 if i not in self.filteredrevs:
269 return i 269 return i
359 if rev in self.filteredrevs: 359 if rev in self.filteredrevs:
360 raise error.FilteredIndexError(rev) 360 raise error.FilteredIndexError(rev)
361 return super(filteredchangelogmixin, self).flags(rev) 361 return super(filteredchangelogmixin, self).flags(rev)
362 362
363 363
364 class repoview(object): 364 class repoview:
365 """Provide a read/write view of a repo through a filtered changelog 365 """Provide a read/write view of a repo through a filtered changelog
366 366
367 This object is used to access a filtered version of a repository without 367 This object is used to access a filtered version of a repository without
368 altering the original repository object itself. We can not alter the 368 altering the original repository object itself. We can not alter the
369 original object for two main reasons: 369 original object for two main reasons: