##// END OF EJS Templates
pull: add --remote-hidden option and pass it through peer creation...
pull: add --remote-hidden option and pass it through peer creation This option will allow to pull changesets that are hidden on the remote. This is useful when looking into a changeset’s evolution history, resolving evolution instability or mirroring a repository. The option is best effort and will only affect the pull when it can. The option will be ignored when it cannot be honored. Support for each type of peer is yet to be implemented. They currently all warn about lack of support. The warning code will get removed as peers gain support for this option. The option is still experimental, so we will have freedom to update the UI or implementation before it graduates out of experimental. Based on a changeset by Pierre-Yves David, which added the option.

File last commit:

r51309:3a2df812 default
r51309:3a2df812 default
Show More
narrowrepo.py
28 lines | 898 B | text/x-python | PythonLexer
# narrowrepo.py - repository which supports narrow revlogs, lazy loading
#
# Copyright 2017 Google, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from mercurial import wireprototypes
from . import narrowdirstate
def wraprepo(repo):
"""Enables narrow clone functionality on a single local repository."""
class narrowrepository(repo.__class__):
def _makedirstate(self):
dirstate = super(narrowrepository, self)._makedirstate()
return narrowdirstate.wrapdirstate(self, dirstate)
def peer(self, *args, **kwds):
peer = super(narrowrepository, self).peer(*args, **kwds)
peer._caps.add(wireprototypes.NARROWCAP)
peer._caps.add(wireprototypes.ELLIPSESCAP)
return peer
repo.__class__ = narrowrepository