Mercurial > hg
comparison tests/test-fncache.t @ 26497:ca778cbe94f3
test-fncache: use args/kwargs for lock wrapper
This is annoying to keep up to date, and also just plain unnecessary.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 06 Oct 2015 15:55:50 -0700 |
parents | efd57cd6fd1d |
children | 56b2bcea2529 |
comparison
equal
deleted
inserted
replaced
26496:b885ab9ca182 | 26497:ca778cbe94f3 |
---|---|
203 $ cat > exceptionext.py <<EOF | 203 $ cat > exceptionext.py <<EOF |
204 > import os | 204 > import os |
205 > from mercurial import commands, util | 205 > from mercurial import commands, util |
206 > from mercurial.extensions import wrapfunction | 206 > from mercurial.extensions import wrapfunction |
207 > | 207 > |
208 > def lockexception(orig, vfs, lockname, wait, releasefn, acquirefn, desc, parentenvvar=None): | 208 > def lockexception(orig, vfs, lockname, wait, releasefn, *args, **kwargs): |
209 > def releasewrap(): | 209 > def releasewrap(): |
210 > raise util.Abort("forced lock failure") | 210 > raise util.Abort("forced lock failure") |
211 > return orig(vfs, lockname, wait, releasewrap, acquirefn, desc) | 211 > return orig(vfs, lockname, wait, releasewrap, *args, **kwargs) |
212 > | 212 > |
213 > def reposetup(ui, repo): | 213 > def reposetup(ui, repo): |
214 > wrapfunction(repo, '_lock', lockexception) | 214 > wrapfunction(repo, '_lock', lockexception) |
215 > | 215 > |
216 > cmdtable = {} | 216 > cmdtable = {} |