comparison tests/test-lock-badness.t @ 32337:46ba2cdda476

registrar: move cmdutil.command to registrar module (API) cmdutil.command wasn't a member of the registrar framework only for a historical reason. Let's make that happen. This patch keeps cmdutil.command as an alias for extension compatibility.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 09 Jan 2016 23:07:20 +0900
parents 0c8c388c7d62
children fce4ed2912bb
comparison
equal deleted inserted replaced
32336:ff874d34c856 32337:46ba2cdda476
12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13 13
14 Test that raising an exception in the release function doesn't cause the lock to choke 14 Test that raising an exception in the release function doesn't cause the lock to choke
15 15
16 $ cat > testlock.py << EOF 16 $ cat > testlock.py << EOF
17 > from mercurial import cmdutil, error, error 17 > from mercurial import error, registrar
18 > 18 >
19 > cmdtable = {} 19 > cmdtable = {}
20 > command = cmdutil.command(cmdtable) 20 > command = registrar.command(cmdtable)
21 > 21 >
22 > def acquiretestlock(repo, releaseexc): 22 > def acquiretestlock(repo, releaseexc):
23 > def unlock(): 23 > def unlock():
24 > if releaseexc: 24 > if releaseexc:
25 > raise error.Abort('expected release exception') 25 > raise error.Abort('expected release exception')