changeset 36018:ae79cf6f9c82

wireproto: remove unnecessary exception trapping The `try..except error.Abort` was added in 8474be4412ca back in 2012. The intent was to ensure a failing pushkey hook didn't crash the server. Since that changeset, repo.pushkey() and the hooks mechanism is now much more robust about trapping errors itself. As such, we no longer need this try..except block. So it has been removed. Differential Revision: https://phab.mercurial-scm.org/D1996
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 31 Jan 2018 10:06:39 -0800
parents 59e4a7781a36
children b4976912a6ef
files mercurial/wireproto.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Tue Feb 06 11:31:25 2018 -0800
+++ b/mercurial/wireproto.py	Wed Jan 31 10:06:39 2018 -0800
@@ -914,11 +914,8 @@
 
         proto.redirect()
 
-        try:
-            r = repo.pushkey(encoding.tolocal(namespace), encoding.tolocal(key),
-                             encoding.tolocal(old), new) or False
-        except error.Abort:
-            r = False
+        r = repo.pushkey(encoding.tolocal(namespace), encoding.tolocal(key),
+                         encoding.tolocal(old), new) or False
 
         output = proto.restore()