comparison hgext/largefiles/overrides.py @ 18144:e16982a74bf7

largefiles: introduce basic debugstate --large functionality Very useful for debugging largefiles "performance" issues. This is used for testing 03faf12fbee7.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 28 Dec 2012 11:55:57 +0100
parents 11d1a9143adb
children 14e31a631e41
comparison
equal deleted inserted replaced
18143:242d2f4ec01c 18144:e16982a74bf7
253 253
254 result = orig(ui, repo, *pats, **opts) 254 result = orig(ui, repo, *pats, **opts)
255 if large: 255 if large:
256 result = result or lfcommands.verifylfiles(ui, repo, all, contents) 256 result = result or lfcommands.verifylfiles(ui, repo, all, contents)
257 return result 257 return result
258
259 def overridedebugstate(orig, ui, repo, *pats, **opts):
260 large = opts.pop('large', False)
261 if large:
262 lfcommands.debugdirstate(ui, repo)
263 else:
264 orig(ui, repo, *pats, **opts)
258 265
259 # Override needs to refresh standins so that update's normal merge 266 # Override needs to refresh standins so that update's normal merge
260 # will go through properly. Then the other update hook (overriding repo.update) 267 # will go through properly. Then the other update hook (overriding repo.update)
261 # will get the new files. Filemerge is also overridden so that the merge 268 # will get the new files. Filemerge is also overridden so that the merge
262 # will merge standins correctly. 269 # will merge standins correctly.