wireproto: remove unnecessary exception trapping
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 31 Jan 2018 10:06:39 -0800
changeset 35979 ae79cf6f9c82
parent 35978 59e4a7781a36
child 35980 b4976912a6ef
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
mercurial/wireproto.py
--- 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()