Mercurial > hg
comparison tests/test-narrow-expanddirstate.t @ 36161:48797b21882e
tests: remove code to support Mercurial 4.3
Now that narrow lives in core, we don't need the legacy support.
Differential Revision: https://phab.mercurial-scm.org/D2202
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 12 Feb 2018 16:22:31 -0800 |
parents | 9fd8c2a3db5a |
children | f6ddbcff5d7b |
comparison
equal
deleted
inserted
replaced
36160:9fd8c2a3db5a | 36161:48797b21882e |
---|---|
73 > | 73 > |
74 > def makeds(ui, repo): | 74 > def makeds(ui, repo): |
75 > def wrapds(orig, self): | 75 > def wrapds(orig, self): |
76 > ds = orig(self) | 76 > ds = orig(self) |
77 > class expandingdirstate(ds.__class__): | 77 > class expandingdirstate(ds.__class__): |
78 > # Mercurial 4.4 uses this version. | |
79 > @hgutil.propertycache | 78 > @hgutil.propertycache |
80 > def _map(self): | 79 > def _map(self): |
81 > ret = super(expandingdirstate, self)._map | 80 > ret = super(expandingdirstate, self)._map |
82 > with repo.wlock(), repo.lock(), repo.transaction( | |
83 > 'expandnarrowspec'): | |
84 > expandnarrowspec(ui, repo, os.environ.get('DIRSTATEINCLUDES')) | |
85 > return ret | |
86 > # Mercurial 4.3.3 and earlier uses this version. It seems that | |
87 > # narrowhg does not currently support this version, but we include | |
88 > # it just in case backwards compatibility is restored. | |
89 > def _read(self): | |
90 > ret = super(expandingdirstate, self)._read() | |
91 > with repo.wlock(), repo.lock(), repo.transaction( | 81 > with repo.wlock(), repo.lock(), repo.transaction( |
92 > 'expandnarrowspec'): | 82 > 'expandnarrowspec'): |
93 > expandnarrowspec(ui, repo, os.environ.get('DIRSTATEINCLUDES')) | 83 > expandnarrowspec(ui, repo, os.environ.get('DIRSTATEINCLUDES')) |
94 > return ret | 84 > return ret |
95 > ds.__class__ = expandingdirstate | 85 > ds.__class__ = expandingdirstate |