Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 36047:55e8efa2451a
subrepo: split non-core functions to new module
Resolves import cycle caused by subrepo -> cmdutil. Still we have another
cycle, cmdutil -> context -> subrepo, but where I think importing context
is wrong. Perhaps we'll need repo.makememctx().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 06 Feb 2018 22:36:38 +0900 |
parents | 44bc37d20271 |
children | 38f480502043 |
comparison
equal
deleted
inserted
replaced
36046:006ff7268c5c | 36047:55e8efa2451a |
---|---|
44 repoview, | 44 repoview, |
45 revlog, | 45 revlog, |
46 scmutil, | 46 scmutil, |
47 sparse, | 47 sparse, |
48 subrepo, | 48 subrepo, |
49 subrepoutil, | |
49 util, | 50 util, |
50 ) | 51 ) |
51 | 52 |
52 propertycache = util.propertycache | 53 propertycache = util.propertycache |
53 | 54 |
171 return scmutil.status(modified, added, removed, deleted, unknown, | 172 return scmutil.status(modified, added, removed, deleted, unknown, |
172 ignored, clean) | 173 ignored, clean) |
173 | 174 |
174 @propertycache | 175 @propertycache |
175 def substate(self): | 176 def substate(self): |
176 return subrepo.state(self, self._repo.ui) | 177 return subrepoutil.state(self, self._repo.ui) |
177 | 178 |
178 def subrev(self, subpath): | 179 def subrev(self, subpath): |
179 return self.substate[subpath][1] | 180 return self.substate[subpath][1] |
180 | 181 |
181 def rev(self): | 182 def rev(self): |