sync: link the internal-fs-layout doc into checkouts

This should make it easy to discover for people poking around .repo/.

Change-Id: Ie5051551f25127c0592df5e36efba7bb2263e5d4
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/323701
Reviewed-by: Jack Neus <jackneus@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Mike Frysinger 2021-11-14 03:53:04 -05:00
parent bf40957b38
commit fdeb20f43f

View File

@ -1121,6 +1121,15 @@ later is required to fix a server side protocol bug.
def _PostRepoUpgrade(manifest, quiet=False):
# Link the docs for the internal .repo/ layout for people
link = os.path.join(manifest.repodir, 'internal-fs-layout.md')
if not platform_utils.islink(link):
target = os.path.join('repo', 'docs', 'internal-fs-layout.md')
try:
platform_utils.symlink(target, link)
except:
pass
wrapper = Wrapper()
if wrapper.NeedSetupGnuPG():
wrapper.SetupGnuPG(quiet)