comparison hgext/git/__init__.py @ 45942:89a2afe31e82

formating: upgrade to black 20.8b1 This required a couple of small tweaks to un-confuse black, but now it works. Big formatting changes come from: * Dramatically improved collection-splitting logic upstream * Black having a strong (correct IMO) opinion that """ is better than ''' Differential Revision: https://phab.mercurial-scm.org/D9430
author Augie Fackler <raf@durin42.com>
date Fri, 27 Nov 2020 17:03:29 -0500
parents 6739ef7c5fcf
children a001e28ad5eb
comparison
equal deleted inserted replaced
45941:346af7687c6f 45942:89a2afe31e82
31 31
32 configtable = {} 32 configtable = {}
33 configitem = registrar.configitem(configtable) 33 configitem = registrar.configitem(configtable)
34 # git.log-index-cache-miss: internal knob for testing 34 # git.log-index-cache-miss: internal knob for testing
35 configitem( 35 configitem(
36 b"git", b"log-index-cache-miss", default=False, 36 b"git",
37 b"log-index-cache-miss",
38 default=False,
37 ) 39 )
38 40
39 # TODO: extract an interface for this in core 41 # TODO: extract an interface for this in core
40 class gitstore(object): # store.basicstore): 42 class gitstore(object): # store.basicstore):
41 def __init__(self, path, vfstype): 43 def __init__(self, path, vfstype):
222 return self.active 224 return self.active
223 raise error.RepoLookupError(_(b"no active bookmark")) 225 raise error.RepoLookupError(_(b"no active bookmark"))
224 return bname 226 return bname
225 227
226 def applychanges(self, repo, tr, changes): 228 def applychanges(self, repo, tr, changes):
227 """Apply a list of changes to bookmarks 229 """Apply a list of changes to bookmarks"""
228 """
229 # TODO: this should respect transactions, but that's going to 230 # TODO: this should respect transactions, but that's going to
230 # require enlarging the gitbmstore to know how to do in-memory 231 # require enlarging the gitbmstore to know how to do in-memory
231 # temporary writes and read those back prior to transaction 232 # temporary writes and read those back prior to transaction
232 # finalization. 233 # finalization.
233 for name, node in changes: 234 for name, node in changes: