config: Discover a shared .revupconfig for a repo-tool checkout#259
config: Discover a shared .revupconfig for a repo-tool checkout#259matt-wagantall-skydio wants to merge 1 commit into
Conversation
|
|
||
| If the current git repo is one project of an Android "repo" tool checkout, | ||
| revup also reads a shared ".revupconfig" from the root of that checkout (the | ||
| directory containing the .repo directory), so a single config can apply to |
There was a problem hiding this comment.
i would think we want to look inside the .repo directory? otherwise where would you commit the config to?
There was a problem hiding this comment.
oh actually .repo/manifests is the git project for the overall repo collection
There was a problem hiding this comment.
Not when we repo init with --local, as we do internally. It's just a plain directory created by repo init, not backed by a git project. My intention is to install the .revupconfig using a repo 'post-sync' hook, which can place it at the top of the tree.
There was a problem hiding this comment.
hmm it would be more ideal to have this automatically work with any repo checkout and not require a separate step
There was a problem hiding this comment.
The post-sync hook setup step isn't required. The .revupconfig could be synced or symlinked to the root of the tree via the repo manifest itself if it was checked in.
In our case, however, I'm trying to avoid checking in a .revupconfig at all. The post-sync hook generates one at the end the end of a 'repo sync' based on the default branch in the manifest. That way we don't need to update the branch name twice (once in in the repo manifest and once in the .revupconfig) when it changes.
973fa55 to
a907060
Compare
a907060 to
c677bd1
Compare
Read the current repo's .revupconfig as before, but when that repo is one project of a "repo" tool checkout, fall back to a shared .revupconfig at the root of the checkout (the directory containing .repo). This lets a group of projects that all track the same branch share one config instead of committing an identical one into each. The checkout is detected from git's own metadata rather than by walking the filesystem: a repo project's git directory lives under .repo, so we resolve the git dir and look for a .repo path component. This avoids accidentally picking up an unrelated project's config from a parent directory. A project's own config still overrides the shared one. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Matt Wagantall <matt.wagantall@skydio.com>
c677bd1 to
990b14e
Compare
Read the current repo's .revupconfig as before, but when that repo is one
project of an Android "repo" checkout, fall back to a shared .revupconfig at
the root of the checkout (the directory containing .repo). This lets a group
of projects that all track the same branch share one config instead of
committing an identical one into each.
The checkout is detected from git's own metadata rather than by walking the
filesystem: a repo project's git directory lives under .repo, so we resolve
the git dir and look for a .repo path component. This avoids accidentally
picking up an unrelated project's config from a parent directory. A project's
own config still overrides the shared one.
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com
Signed-off-by: Matt Wagantall matt.wagantall@skydio.com