comparison hgext/largefiles/reposetup.py @ 50136:b38b53c5674e

large-files: wrap reposetup's status in a `running_status` context This is the way.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 22 Feb 2023 00:19:00 +0100
parents 6000f5b25c9b
children 521fec115dad
comparison
equal deleted inserted replaced
50135:31be0b46fd47 50136:b38b53c5674e
137 wlock = self.wlock(False) 137 wlock = self.wlock(False)
138 gotlock = True 138 gotlock = True
139 except error.LockError: 139 except error.LockError:
140 wlock = util.nullcontextmanager() 140 wlock = util.nullcontextmanager()
141 gotlock = False 141 gotlock = False
142 with wlock: 142 with wlock, self.dirstate.running_status(self):
143 143
144 # First check if paths or patterns were specified on the 144 # First check if paths or patterns were specified on the
145 # command line. If there were, and they don't match any 145 # command line. If there were, and they don't match any
146 # largefiles, we should just bail here and let super 146 # largefiles, we should just bail here and let super
147 # handle it -- thus gaining a big performance boost. 147 # handle it -- thus gaining a big performance boost.
319 for items in result 319 for items in result
320 ] 320 ]
321 321
322 if gotlock: 322 if gotlock:
323 lfdirstate.write(self.currenttransaction()) 323 lfdirstate.write(self.currenttransaction())
324 else:
325 lfdirstate.invalidate()
324 326
325 self.lfstatus = True 327 self.lfstatus = True
326 return scmutil.status(*result) 328 return scmutil.status(*result)
327 329
328 def commitctx(self, ctx, *args, **kwargs): 330 def commitctx(self, ctx, *args, **kwargs):