Show More
@@ -271,6 +271,13 def _updateprompt(ui, sub, dirty, local, | |||
|
271 | 271 | % (subrelpath(sub), local, remote)) |
|
272 | 272 | return ui.promptchoice(msg, 0) |
|
273 | 273 | |
|
274 | def reporelpath(repo): | |
|
275 | """return path to this (sub)repo as seen from outermost repo""" | |
|
276 | parent = repo | |
|
277 | while util.safehasattr(parent, '_subparent'): | |
|
278 | parent = parent._subparent | |
|
279 | return repo.root[len(pathutil.normasprefix(parent.root)):] | |
|
280 | ||
|
274 | 281 | def subrelpath(sub): |
|
275 | 282 | """return path to this subrepo as seen from outermost repo""" |
|
276 | 283 | return sub._relpath |
@@ -551,13 +558,7 class abstractsubrepo(object): | |||
|
551 | 558 | def _relpath(self): |
|
552 | 559 | """return path to this subrepository as seen from outermost repository |
|
553 | 560 | """ |
|
554 | repo = self._ctx.repo() | |
|
555 | parent = repo | |
|
556 | while util.safehasattr(parent, '_subparent'): | |
|
557 | parent = parent._subparent | |
|
558 | reporelpath = repo.root[len(pathutil.normasprefix(parent.root)):] | |
|
559 | ||
|
560 | return self.wvfs.reljoin(reporelpath, self._path) | |
|
561 | return self.wvfs.reljoin(reporelpath(self._ctx.repo()), self._path) | |
|
561 | 562 | |
|
562 | 563 | class hgsubrepo(abstractsubrepo): |
|
563 | 564 | def __init__(self, ctx, path, state): |
General Comments 0
You need to be logged in to leave comments.
Login now