Open LukeAI opened 3 years ago
I was looking for this feature inside of the vcstool. Is there a plan to make it available?
Or at least to have a command allowing users to explicitly request a warning that a repository is present when they call vcs import
(this issue seems to be similar to such functionality). If the system is big, dynamic, and relies heavily on vcs tool - like autoware - it is quite difficult to keep track of changing repositories without such a feature.
This is a problem in gitlab CI with the default git strategy. Clones in CI get polluted with old repos, and there isn't a way to clean it out. https://docs.gitlab.com/ee/ci/pipelines/settings.html#choose-the-default-git-strategy
If you take care of using a good .gitignore
that matches the repos file, then you could try cleaning out the local git directory after checkout.
Wow, this workflow is also broken when a fetch
git strategy.
branchA
repositories:
my/repo1:
type: git
url: git@github.com:my/repo1.git
version: branchA
.repos
file where you switch branches to branchB
repositories:
my/repo1:
type: git
url: git@github.com:my/repo1.git
version: branchB
And, the CI checkout script is as follows:
vcs import --input my_sources.repos src --debug --force --shallow
vcs pull src
vcs status src
The import and pull succeeds, but vcs status
still shows my/repo1
is at branchA
.
We have a mix of local repositories and cloned reposities in the src
workspace. Being able to clear out the src
directory and use VCS to check out the correct branch when using fetch
strategy for the top workspace would be extremely helpful to keep CI fast.
For now, we will have to change to a pull
strategy and do a lot of I/O in jobs.
say I have a
myrepos.repos
file that is imported by a workspace setup script like:vcs import < repos/myrepos.repos
myrepos.repos
is in version control and contains a set of repos that changes over time, sometimes repos are added and sometimes taken away.Currently, if a repo is deleted from
myrepos.repos
- the previously cloned subrepo persists. Is there some supported way I can have vcstool automatically delete everything that is not defined inmyrepos.repos
?I could simply
rm -rf src
before runningvcs import
but unfortunately downloading is expensive as there are a number of very large (LFS) files in the repos.