Show More
@@ -8,20 +8,20 b'' | |||||
8 | > cmdtable = {} |
|
8 | > cmdtable = {} | |
9 | > command = registrar.command(cmdtable) |
|
9 | > command = registrar.command(cmdtable) | |
10 | > |
|
10 | > | |
11 | > @command('buggylocking', [], '') |
|
11 | > @command(b'buggylocking', [], '') | |
12 | > def buggylocking(ui, repo): |
|
12 | > def buggylocking(ui, repo): | |
13 | > lo = repo.lock() |
|
13 | > lo = repo.lock() | |
14 | > wl = repo.wlock() |
|
14 | > wl = repo.wlock() | |
15 | > wl.release() |
|
15 | > wl.release() | |
16 | > lo.release() |
|
16 | > lo.release() | |
17 | > |
|
17 | > | |
18 | > @command('buggytransaction', [], '') |
|
18 | > @command(b'buggytransaction', [], '') | |
19 | > def buggylocking(ui, repo): |
|
19 | > def buggylocking(ui, repo): | |
20 | > tr = repo.transaction('buggy') |
|
20 | > tr = repo.transaction('buggy') | |
21 | > # make sure we rollback the transaction as we don't want to rely on the__del__ |
|
21 | > # make sure we rollback the transaction as we don't want to rely on the__del__ | |
22 | > tr.release() |
|
22 | > tr.release() | |
23 | > |
|
23 | > | |
24 | > @command('properlocking', [], '') |
|
24 | > @command(b'properlocking', [], '') | |
25 | > def properlocking(ui, repo): |
|
25 | > def properlocking(ui, repo): | |
26 | > """check that reentrance is fine""" |
|
26 | > """check that reentrance is fine""" | |
27 | > wl = repo.wlock() |
|
27 | > wl = repo.wlock() | |
@@ -37,14 +37,14 b'' | |||||
37 | > lo.release() |
|
37 | > lo.release() | |
38 | > wl.release() |
|
38 | > wl.release() | |
39 | > |
|
39 | > | |
40 | > @command('nowaitlocking', [], '') |
|
40 | > @command(b'nowaitlocking', [], '') | |
41 | > def nowaitlocking(ui, repo): |
|
41 | > def nowaitlocking(ui, repo): | |
42 | > lo = repo.lock() |
|
42 | > lo = repo.lock() | |
43 | > wl = repo.wlock(wait=False) |
|
43 | > wl = repo.wlock(wait=False) | |
44 | > wl.release() |
|
44 | > wl.release() | |
45 | > lo.release() |
|
45 | > lo.release() | |
46 | > |
|
46 | > | |
47 | > @command('stripintr', [], '') |
|
47 | > @command(b'stripintr', [], '') | |
48 | > def stripintr(ui, repo): |
|
48 | > def stripintr(ui, repo): | |
49 | > lo = repo.lock() |
|
49 | > lo = repo.lock() | |
50 | > tr = repo.transaction('foobar') |
|
50 | > tr = repo.transaction('foobar') | |
@@ -52,16 +52,16 b'' | |||||
52 | > repair.strip(repo.ui, repo, [repo['.'].node()]) |
|
52 | > repair.strip(repo.ui, repo, [repo['.'].node()]) | |
53 | > finally: |
|
53 | > finally: | |
54 | > lo.release() |
|
54 | > lo.release() | |
55 | > @command('oldanddeprecated', [], '') |
|
55 | > @command(b'oldanddeprecated', [], '') | |
56 | > def oldanddeprecated(ui, repo): |
|
56 | > def oldanddeprecated(ui, repo): | |
57 | > """test deprecation warning API""" |
|
57 | > """test deprecation warning API""" | |
58 | > def foobar(ui): |
|
58 | > def foobar(ui): | |
59 | > ui.deprecwarn('foorbar is deprecated, go shopping', '42.1337') |
|
59 | > ui.deprecwarn('foorbar is deprecated, go shopping', '42.1337') | |
60 | > foobar(ui) |
|
60 | > foobar(ui) | |
61 | > @command('nouiwarning', [], '') |
|
61 | > @command(b'nouiwarning', [], '') | |
62 | > def nouiwarning(ui, repo): |
|
62 | > def nouiwarning(ui, repo): | |
63 | > util.nouideprecwarn('this is a test', '13.37') |
|
63 | > util.nouideprecwarn('this is a test', '13.37') | |
64 | > @command('programmingerror', [], '') |
|
64 | > @command(b'programmingerror', [], '') | |
65 | > def programmingerror(ui, repo): |
|
65 | > def programmingerror(ui, repo): | |
66 | > raise error.ProgrammingError('something went wrong', hint='try again') |
|
66 | > raise error.ProgrammingError('something went wrong', hint='try again') | |
67 | > EOF |
|
67 | > EOF |
General Comments 0
You need to be logged in to leave comments.
Login now