wireprotov2: always advertise raw repo requirements
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 03 Oct 2018 10:04:04 -0700
changeset 40049 39074a35f7db
parent 40048 a732d70253b0
child 40050 8e136940c0e6
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
mercurial/wireprotov2server.py
--- 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: