diff mercurial/wireprotov2server.py @ 40050:39074a35f7db

wireprotov2: always advertise raw repo requirements I'm pretty sure my original thinking behind making it conditional on stream clone support was that the behavior mirrored wire protocol version 1. I don't see a compelling reason for us to not advertise the server's storage requirements. The proper way to advertise stream clone support in wireprotov2 would be to not advertise the command(s) required to perform stream clone or to advertise a separate capability denoting stream clone support. Stream clone isn't yet implemented on wireprotov2, so we can cross this bridge later. Differential Revision: https://phab.mercurial-scm.org/D4863
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 03 Oct 2018 10:04:04 -0700
parents b099e6032f38
children 9b19b8ce3804
line wrap: on
line diff
--- a/mercurial/wireprotov2server.py	Wed Oct 03 09:48:22 2018 -0700
+++ b/mercurial/wireprotov2server.py	Wed Oct 03 10:04:04 2018 -0700
@@ -20,7 +20,6 @@
     error,
     narrowspec,
     pycompat,
-    streamclone,
     util,
     wireprotoframing,
     wireprototypes,
@@ -522,9 +521,8 @@
             'permissions': [entry.permission],
         }
 
-    if streamclone.allowservergeneration(repo):
-        caps['rawrepoformats'] = sorted(repo.requirements &
-                                        repo.supportedformats)
+    caps['rawrepoformats'] = sorted(repo.requirements &
+                                    repo.supportedformats)
 
     targets = getadvertisedredirecttargets(repo, proto)
     if targets: