This is an archive of the discontinued Mercurial Phabricator instance.

test-push-race: use 'ui.atexit' instead of python's 'atexit'
ClosedPublic

Authored by singhsrb on Oct 5 2017, 4:43 PM.

Details

Summary

Callbacks registered with 'atexit' are sometimes not called (like when a
process is killed by the SIGTERM signal). Therefore, this commit replaces it
with 'ui.atexit' which ensures that the callbacks are always called. This also
makes the test compatible with chg.

Test Plan

Ran the test 'test-push-race.t' with and without the '--chg' option.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

singhsrb created this revision.Oct 5 2017, 4:43 PM
singhsrb updated this revision to Diff 2472.Oct 5 2017, 4:44 PM

Removing the full-stop at the end of commit message.

singhsrb retitled this revision from test-push-race: use 'ui.atexit' instead of python's 'atexit'. to test-push-race: use 'ui.atexit' instead of python's 'atexit'.Oct 5 2017, 4:45 PM
singhsrb edited the summary of this revision. (Show Details)Oct 5 2017, 4:48 PM
singhsrb updated this revision to Diff 2475.

Updating to a more correct summary.

quark accepted this revision.Oct 5 2017, 6:35 PM
This revision was automatically updated to reflect the committed changes.