singhsrb created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY 'atexit' is sometimes not called (like when a process is killed by the SIGTERM signal). Therefore, this commit replaces it with 'ui.atexit' which is 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. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D957 AFFECTED FILES tests/test-push-race.t CHANGE DETAILS diff --git a/tests/test-push-race.t b/tests/test-push-race.t --- a/tests/test-push-race.t +++ b/tests/test-push-race.t @@ -15,7 +15,6 @@ > Client with the extensions will create a file when ready and get stuck until > a file is created.""" > - > import atexit > import errno > import os > import time @@ -51,7 +50,7 @@ > except OSError as exc: > if exc.errno != errno.ENOENT: > raise - > atexit.register(delete) + > ui.atexit(delete) > return orig(pushop) > > def uisetup(ui): To: singhsrb, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel