| 1 | # narrowrepo.py - repository which supports narrow revlogs, lazy loading |
| 2 | # |
| 3 | # Copyright 2017 Google, Inc. |
| 4 | # |
| 5 | # This software may be used and distributed according to the terms of the |
| 6 | # GNU General Public License version 2 or any later version. |
| 7 | |
| 8 | from __future__scip-python python python-stdlib 3.11 __future__/__init__: import annotationsscip-python python python-stdlib 3.11 __future__/annotations.annotations. |
| 9 | |
| 10 | from mercurialscip-python python mercurial 7.2.2 mercurial/__init__: import wireprototypesscip-python python mercurial 7.2.2 `mercurial.wireprototypes`/__init__: |
| 11 | |
| 12 | from . import narrowdirstatescip-python python mercurial 7.2.2 narrowdirstate/__init__: |
| 13 | |
| 14 | |
| 15 | def wrapreposcip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().(reposcip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().(repo)): |
| 16 | """Enables narrow clone functionality on a single local repository.""" |
| 17 | |
| 18 | class narrowrepositoryscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#(reposcip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().(repo).__class__): |
| 19 | def _makedirstatescip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#_makedirstate().(selfscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#_makedirstate().(self)): |
| 20 | dirstate = superscip-python python python-stdlib 3.11 builtins/super#()._makedirstate() |
| 21 | return narrowdirstatescip-python python mercurial 7.2.2 narrowdirstate/__init__:.wrapdirstatescip-python python mercurial 7.2.2 `hgext.narrow.narrowdirstate`/wrapdirstate().(selfscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#_makedirstate().(self), dirstate) |
| 22 | |
| 23 | def peerscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#peer().(selfscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#peer().(self), *argsscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#peer().(args), **kwdsscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#peer().(kwds)): |
| 24 | peer = superscip-python python python-stdlib 3.11 builtins/super#().peer(*argsscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#peer().(args), **kwdsscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository#peer().(kwds)) |
| 25 | peer._caps.add(wireprototypesscip-python python mercurial 7.2.2 `mercurial.wireprototypes`/__init__:.NARROWCAPscip-python python mercurial 7.2.2 `mercurial.wireprototypes`/NARROWCAP.NARROWCAP.) |
| 26 | peer._caps.add(wireprototypesscip-python python mercurial 7.2.2 `mercurial.wireprototypes`/__init__:.ELLIPSESCAPscip-python python mercurial 7.2.2 `mercurial.wireprototypes`/ELLIPSESCAP.ELLIPSESCAP.) |
| 27 | return peer |
| 28 | |
| 29 | reposcip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().(repo).__class__ = narrowrepositoryscip-python python mercurial 7.2.2 `hgext.narrow.narrowrepo`/wraprepo().narrowrepository# |