pushkey: add localrepo support
authorMatt Mackall <mpm@selenic.com>
Wed, 16 Jun 2010 16:04:46 -0500
changeset 11368 b9eb005c54ad
parent 11367 ca4fc993087c
child 11369 02a4373ca5cd
pushkey: add localrepo support
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Wed Jun 16 16:04:44 2010 -0500
+++ b/mercurial/localrepo.py	Wed Jun 16 16:04:46 2010 -0500
@@ -7,7 +7,7 @@
 
 from node import bin, hex, nullid, nullrev, short
 from i18n import _
-import repo, changegroup, subrepo, discovery
+import repo, changegroup, subrepo, discovery, pushkey
 import changelog, dirstate, filelog, manifest, context
 import lock, transaction, store, encoding
 import util, extensions, hook, error
@@ -20,7 +20,7 @@
 propertycache = util.propertycache
 
 class localrepository(repo.repository):
-    capabilities = set(('lookup', 'changegroupsubset', 'branchmap'))
+    capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey'))
     supported = set('revlogv1 store fncache shared'.split())
 
     def __init__(self, baseui, path=None, create=0):
@@ -1846,6 +1846,12 @@
             return self.stream_in(remote)
         return self.pull(remote, heads)
 
+    def pushkey(self, namespace, key, old, new):
+        return pushkey.push(self, namespace, key, old, new)
+
+    def listkeys(self, namespace):
+        return pushkey.list(self, namespace)
+
 # used to avoid circular references so destructors work
 def aftertrans(files):
     renamefiles = [tuple(t) for t in files]