D3171: wireproto: send server capabilities in canonical order

2018-04-06 Thread joerg.sonnenberger (Joerg Sonnenberger)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG33af46d639b4: wireproto: send server capabilities in 
canonical order (authored by joerg.sonnenberger, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3171?vs=7808&id=7811

REVISION DETAIL
  https://phab.mercurial-scm.org/D3171

AFFECTED FILES
  mercurial/wireproto.py
  tests/test-debugcommands.t
  tests/test-hgweb-commands.t
  tests/test-http-bad-server.t
  tests/test-http-protocol.t
  tests/test-ssh-bundle1.t
  tests/test-ssh-proto-unbundle.t
  tests/test-ssh-proto.t
  tests/test-ssh.t

CHANGE DETAILS

diff --git a/tests/test-ssh.t b/tests/test-ssh.t
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -497,7 +497,7 @@
   sending between command
   remote: 413 (sshv1 !)
   protocol upgraded to exp-ssh-v2-0001 (sshv2 !)
-  remote: capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   remote: 1 (sshv1 !)
   devel-peer-request: protocaps
   devel-peer-request:   caps: * bytes (glob)
diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t
--- a/tests/test-ssh-proto.t
+++ b/tests/test-ssh-proto.t
@@ -64,7 +64,7 @@
   devel-peer-request:   pairs: 81 bytes
   sending between command
   remote: 413
-  remote: capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   remote: 1
   devel-peer-request: protocaps
   devel-peer-request:   caps: * bytes (glob)
@@ -87,16 +87,16 @@
   o> readline() -> 4:
   o> 413\n
   o> readline() -> 413:
-  o> capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch\n
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
 
 `hg debugserve --sshstdio` works
 
   $ cd server
   $ hg debugserve --sshstdio << EOF
   > hello
   > EOF
   413
-  capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
 
 I/O logging works
 
@@ -106,22 +106,22 @@
   o> write(4) -> 4:
   o> 413\n
   o> write(413) -> 413:
-  o> capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch\n
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   413
-  capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   o> flush() -> None
 
   $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF
   > hello
   > EOF
   413
-  capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
 
   $ cat $TESTTMP/io
   o> write(4) -> 4:
   o> 413\n
   o> write(413) -> 413:
-  o> capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch\n
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generald

D3171: wireproto: send server capabilities in canonical order

2018-04-06 Thread indygreg (Gregory Szorc)
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  THANK YOU for this cleanup. The wonky ordering due to the way capabilities 
are added on the server has annoyed me too.
  
  As part of reviewing this, it is more obvious than before that 
`$USUAL_BUNDLE2_CAPS_SERVER$` should probably be loosened so it doesn't include 
the `bundle2=` prefix. That would make it clear that it belongs at this 
position in the list.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3171

To: joerg.sonnenberger, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3171: wireproto: send server capabilities in canonical order

2018-04-06 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3171

AFFECTED FILES
  mercurial/wireproto.py
  tests/test-debugcommands.t
  tests/test-hgweb-commands.t
  tests/test-http-bad-server.t
  tests/test-http-protocol.t
  tests/test-ssh-bundle1.t
  tests/test-ssh-proto-unbundle.t
  tests/test-ssh-proto.t
  tests/test-ssh.t

CHANGE DETAILS

diff --git a/tests/test-ssh.t b/tests/test-ssh.t
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -497,7 +497,7 @@
   sending between command
   remote: 413 (sshv1 !)
   protocol upgraded to exp-ssh-v2-0001 (sshv2 !)
-  remote: capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   remote: 1 (sshv1 !)
   devel-peer-request: protocaps
   devel-peer-request:   caps: * bytes (glob)
diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t
--- a/tests/test-ssh-proto.t
+++ b/tests/test-ssh-proto.t
@@ -64,7 +64,7 @@
   devel-peer-request:   pairs: 81 bytes
   sending between command
   remote: 413
-  remote: capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   remote: 1
   devel-peer-request: protocaps
   devel-peer-request:   caps: * bytes (glob)
@@ -87,16 +87,16 @@
   o> readline() -> 4:
   o> 413\n
   o> readline() -> 413:
-  o> capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch\n
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
 
 `hg debugserve --sshstdio` works
 
   $ cd server
   $ hg debugserve --sshstdio << EOF
   > hello
   > EOF
   413
-  capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
 
 I/O logging works
 
@@ -106,22 +106,22 @@
   o> write(4) -> 4:
   o> 413\n
   o> write(413) -> 413:
-  o> capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch\n
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   413
-  capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   o> flush() -> None
 
   $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF
   > hello
   > EOF
   413
-  capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
 
   $ cat $TESTTMP/io
   o> write(4) -> 4:
   o> 413\n
   o> write(413) -> 413:
-  o> capabilities: lookup branchmap pushkey known getbundle unbundlehash 
changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ 
unbundle=HG10GZ,HG10BZ,HG10UN protocaps batch\n
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
   o> flush() -> None
 
   $ cd ..
@@ -148,7 +148,7 @@
   o> readline() -> 4:
   o> 413\n
   o> readline()