tests/test-nointerrupt.t
changeset 41079 8ecb17b7f432
parent 39496 3ba87d5b9ad3
child 46226 0826d684a1b5
equal deleted inserted replaced
41078:d0c86a7447a6 41079:8ecb17b7f432
    11   > cmdtable = {}
    11   > cmdtable = {}
    12   > command = registrar.command(cmdtable)
    12   > command = registrar.command(cmdtable)
    13   > 
    13   > 
    14   > @command(b'sleep', [], _(b'TIME'), norepo=True)
    14   > @command(b'sleep', [], _(b'TIME'), norepo=True)
    15   > def sleep(ui, sleeptime=b"1", **opts):
    15   > def sleep(ui, sleeptime=b"1", **opts):
    16   >     with ui.uninterruptable():
    16   >     with ui.uninterruptible():
    17   >         for _i in itertools.repeat(None, int(sleeptime)):
    17   >         for _i in itertools.repeat(None, int(sleeptime)):
    18   >             time.sleep(1)
    18   >             time.sleep(1)
    19   >         ui.warn(b"end of unsafe operation\n")
    19   >         ui.warn(b"end of unsafe operation\n")
    20   >     ui.warn(b"%s second(s) passed\n" % sleeptime)
    20   >     ui.warn(b"%s second(s) passed\n" % sleeptime)
    21   > EOF
    21   > EOF