diff -r 273ea09f6550 -r 7c05198cd1ca mercurial/exchange.py --- a/mercurial/exchange.py Sat May 12 22:29:28 2018 +0200 +++ b/mercurial/exchange.py Tue May 15 22:12:55 2018 +0900 @@ -8,7 +8,6 @@ from __future__ import absolute_import import collections -import errno import hashlib from .i18n import _ @@ -513,9 +512,7 @@ pushop.trmanager = transactionmanager(pushop.repo, 'push-response', pushop.remote.url()) - except IOError as err: - if err.errno != errno.EACCES: - raise + except error.LockUnavailable as err: # source repo cannot be locked. # We do not abort the push, but just disable the local phase # synchronisation.