Patchwork [2,of,4,V2] schemas: add schemas listkeys implementation

login
register
mail settings
Submitter Durham Goode
Date Aug. 8, 2013, 11:31 p.m.
Message ID <a36f431e8d64d3061253.1376004706@dev350.prn1.facebook.com>
Download mbox | patch
Permalink /patch/2098/
State Deferred
Headers show

Comments

Durham Goode - Aug. 8, 2013, 11:31 p.m.
# HG changeset patch
# User Durham Goode <durham@fb.com>
# Date 1375827497 25200
#      Tue Aug 06 15:18:17 2013 -0700
# Node ID a36f431e8d64d3061253dca0606bb98d4e89364e
# Parent  c683c90d00b124f985f4d8b3b51c65210317eb38
schemas: add schemas listkeys implementation

This adds the wire protocol logic for requesting and transmitting
schema data. It is transmitted via the existing listkeys protocol,
but schemas cannot be pushed to the server.

Patch

diff --git a/mercurial/pushkey.py b/mercurial/pushkey.py
--- a/mercurial/pushkey.py
+++ b/mercurial/pushkey.py
@@ -19,6 +19,7 @@ 
                "bookmarks": (bookmarks.pushbookmark, bookmarks.listbookmarks),
                "phases": (phases.pushphase, phases.listphases),
                "obsolete": (obsolete.pushmarker, obsolete.listmarkers),
+               "schemas": (lambda *x: False, lambda repo: repo.schemas),
               }
 
 def register(namespace, pushkey, listkeys):
diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -54,6 +54,7 @@ 
   namespaces	
   obsolete	
   phases	
+  schemas	
   $ hg debugpushkey ../a bookmarks
   X	4e3505fd95835d721066b76e75dbb8cc554d7f77
   Y	4e3505fd95835d721066b76e75dbb8cc554d7f77
@@ -340,6 +341,7 @@ 
   namespaces	
   obsolete	
   phases	
+  schemas	
   $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
   @	9b140be1080824d768c5a4691a564088eede71f9
   X	9b140be1080824d768c5a4691a564088eede71f9
diff --git a/tests/test-ssh.t b/tests/test-ssh.t
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -167,6 +167,7 @@ 
   bookmarks	
   namespaces	
   phases	
+  schemas	
   $ hg book foo -r 0
   $ hg out -B
   comparing with ssh://user@dummy/remote