changeset 20963:ffddabb8aa5d

bundle2: use discard to remove bundle2 cap caps.remove('bundle2') was throwing an exception if bundle2 wasn't present in the capabilities. This was causing test-static-http.t to hang. Let's just use discard, so we don't get an exception.
author Durham Goode <durham@fb.com>
date Tue, 08 Apr 2014 13:05:29 -0700
parents af4158b8876b
children a939eeb94833
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Apr 07 11:45:50 2014 -0700
+++ b/mercurial/localrepo.py	Tue Apr 08 13:05:29 2014 -0700
@@ -281,7 +281,7 @@
         # required by the tests (or some brave tester)
         if not self.ui.configbool('server', 'bundle2', False):
             caps = set(caps)
-            caps.remove('bundle2')
+            caps.discard('bundle2')
         return caps
 
     def _applyrequirements(self, requirements):