submodule which is not main branch is not init or updated
Closed this issue · 3 comments
KohMat commented
A submodule which is not main(e.g. not master or develop) is not edited or updated by:
vcs import < *.repo --recursive
Is there any way to update the submodule.
dirk-thomas commented
Please provide exact steps to reproduce your use case.
KohMat commented
Sorry to late responce. I tested vcs 0.1.40 with this repo.
The repository has 2 branchs:
- master : has this vcstool submodule
- develop : does not have the vcstool submodule but has other submodule.
When I try to import the develop of the repository with the following file and command:
.repo
:
repositories:
test:
type: git
url: git@github.com:KohMat/test.git
version: develop
The terminal log:
$ vcs import < test.repo --recursive
=== ./test (git) ===
Cloning into '.'...
Submodule 'vcstool' (https://github.com/dirk-thomas/vcstool.git) registered for path 'vcstool'
Cloning into 'vcstool'...
Submodule path 'vcstool': checked out '5fe93e3978f48d754d2de62506da6b56c20a87d2'
warning: unable to rmdir vcstool: Directory not empty
Switched to a new branch 'develop'
Branch develop set up to track remote branch develop from origin.
There are not the files from the other submodules:
$ tree -L 3
.
├── test
│ ├── vcstool
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── MANIFEST.in
│ │ ├── README.rst
│ │ ├── scripts
│ │ ├── setup.py
│ │ ├── setup.sh
│ │ ├── stdeb.cfg
│ │ ├── test
│ │ ├── vcstool
│ │ └── vcstool-completion
│ └── xtensor
└── test.repo
7 directories, 9 files
dirk-thomas commented
Please try the patch in #94 which should resolve the bug using import --recursive
in combination with a non-default branch. It would be great if you could give it a try and comment here if it resolved the problem for you.