tests/test-push-race.t
changeset 49306 2e726c934fcd
parent 47920 9c4204b7f3e4
child 49656 c6f0bcb7bc57
equal deleted inserted replaced
49305:53e9422a9b45 49306:2e726c934fcd
    56   >         else:
    56   >         else:
    57   >             # delete the file at the end of the push
    57   >             # delete the file at the end of the push
    58   >             def delete():
    58   >             def delete():
    59   >                 try:
    59   >                 try:
    60   >                     os.unlink(watchpath)
    60   >                     os.unlink(watchpath)
    61   >                 except OSError as exc:
    61   >                 except FileNotFoundError:
    62   >                     if exc.errno != errno.ENOENT:
    62   >                     pass
    63   >                         raise
       
    64   >             ui.atexit(delete)
    63   >             ui.atexit(delete)
    65   >     return orig(pushop)
    64   >     return orig(pushop)
    66   > 
    65   > 
    67   > def uisetup(ui):
    66   > def uisetup(ui):
    68   >     extensions.wrapfunction(exchange, b'_pushbundle2', delaypush)
    67   >     extensions.wrapfunction(exchange, b'_pushbundle2', delaypush)