diff -r d60678a567a9 -r 328739ea70c3 mercurial/repair.py --- a/mercurial/repair.py Tue Jun 23 22:38:21 2015 -0700 +++ b/mercurial/repair.py Tue Jun 23 22:20:08 2015 -0700 @@ -205,7 +205,7 @@ for undovfs, undofile in repo.undofiles(): try: undovfs.unlink(undofile) - except OSError, e: + except OSError as e: if e.errno != errno.ENOENT: ui.warn(_('error removing %s: %s\n') % (undovfs.join(undofile), str(e)))