comparison hgext/narrow/narrowrepo.py @ 43076:2372284d9457

formatting: blacken the codebase This is using my patch to black (https://github.com/psf/black/pull/826) so we don't un-wrap collection literals. Done with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S # skip-blame mass-reformatting only # no-check-commit reformats foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D6971
author Augie Fackler <augie@google.com>
date Sun, 06 Oct 2019 09:45:02 -0400
parents f7011b44d205
children 6000f5b25c9b
comparison
equal deleted inserted replaced
43075:57875cf423c9 43076:2372284d9457
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 from __future__ import absolute_import 8 from __future__ import absolute_import
9 9
10 from mercurial import ( 10 from mercurial import wireprototypes
11 wireprototypes,
12 )
13 11
14 from . import ( 12 from . import narrowdirstate
15 narrowdirstate, 13
16 )
17 14
18 def wraprepo(repo): 15 def wraprepo(repo):
19 """Enables narrow clone functionality on a single local repository.""" 16 """Enables narrow clone functionality on a single local repository."""
20 17
21 class narrowrepository(repo.__class__): 18 class narrowrepository(repo.__class__):
22
23 def _makedirstate(self): 19 def _makedirstate(self):
24 dirstate = super(narrowrepository, self)._makedirstate() 20 dirstate = super(narrowrepository, self)._makedirstate()
25 return narrowdirstate.wrapdirstate(self, dirstate) 21 return narrowdirstate.wrapdirstate(self, dirstate)
26 22
27 def peer(self): 23 def peer(self):