Page MenuHomePhabricator

subrepo: introduce a `repo_rel_or_abs_source` function
ClosedPublic

Authored by marmoute on Apr 15 2021, 3:36 AM.

Details

Summary

The subrepoutil module has various function to compute the path of a
sub-repository compared to the root of the top repository. However, they was no
function available to compute the relative path of the repository "source". And
we need this information for exchange operation (in our case, hg outgoing).
The information is currently build using the repo._subtoppath hack. We reuse
the same logic but in a dedicated function independent of the repo._subtoppath
hack.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.