# HG changeset patch # User Matt Mackall # Date 1276722286 18000 # Node ID b9eb005c54addbda6d58161f3261046c3d04ae53 # Parent ca4fc993087ce939944d981104ab048a0b77e5ee pushkey: add localrepo support diff -r ca4fc993087c -r b9eb005c54ad 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]