Show More
@@ -383,6 +383,24 b' def precommit(ui, wctx, status, match, f' | |||||
383 | return subs, commitsubs, newstate |
|
383 | return subs, commitsubs, newstate | |
384 |
|
384 | |||
385 |
|
385 | |||
|
386 | def repo_rel_or_abs_source(repo): | |||
|
387 | """return the source of this repo | |||
|
388 | ||||
|
389 | Either absolute or relative the outermost repo""" | |||
|
390 | parent = repo | |||
|
391 | chunks = [] | |||
|
392 | while util.safehasattr(parent, b'_subparent'): | |||
|
393 | source = urlutil.url(parent._subsource) | |||
|
394 | chunks.append(bytes(source)) | |||
|
395 | if source.isabs(): | |||
|
396 | break | |||
|
397 | parent = parent._subparent | |||
|
398 | ||||
|
399 | chunks.reverse() | |||
|
400 | path = posixpath.join(*chunks) | |||
|
401 | return posixpath.normpath(path) | |||
|
402 | ||||
|
403 | ||||
386 | def reporelpath(repo): |
|
404 | def reporelpath(repo): | |
387 | # type: (localrepo.localrepository) -> bytes |
|
405 | # type: (localrepo.localrepository) -> bytes | |
388 | """return path to this (sub)repo as seen from outermost repo""" |
|
406 | """return path to this (sub)repo as seen from outermost repo""" |
General Comments 0
You need to be logged in to leave comments.
Login now