Opened 8 years ago
Closed 8 years ago
#10036 closed Bugs (fixed)
Submodules not cleaned
Reported by: | Owned by: | Noel Belcourt | |
---|---|---|---|
Milestone: | To Be Determined | Component: | Regression Testing USE GITHUB |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | git | Cc: |
Description
regression.py cleans the source directory of the super-project, but not the submodules. The "git status" command it runs just after cleaning shows this for me:
On branch develop Your branch is up-to-date with 'origin/develop'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: libs/interprocess (modified content) modified: libs/numeric/odeint (untracked content) modified: tools/build (modified content, untracked content) no changes added to commit (use "git add" and/or "git commit -a")
The changes in libs/interprocess were caused by my patch_boost script. The changes in libs/numeric/odeint were generated files. The changes in tools/build were generated files plus manual changes I made to test something between runs.
Adding the following command would appear to fix it:
git submodule foreach "(git reset --hard; git clean -fxd)"
While researching this I stumbled upon the fact that orphaned submodule directories aren't removed by git clean unless you pass it -ffxd (see the help for the -d option). However this will remove submodules that are present in another branch but not the current one, which may or may not be a good idea.
Regards
Niklas Angare
Attachments (1)
Change History (8)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
I've got a runner that can't be set to run automatically until this patch is committed.
comment:4 by , 8 years ago
I see that it was pushed to develop, then backed out again? Was there a problem?
follow-up: 6 comment:5 by , 8 years ago
I was afraid I'd broken some testers so I reverted it. It now seems that was unnecessary so I'll re-apply the patch.
comment:6 by , 8 years ago
Owner: | changed from | to
---|
Replying to noel_belcourt:
I was afraid I'd broken some testers so I reverted it. It now seems that was unnecessary so I'll re-apply the patch.
Did you re-apply the patch? Just wondering if we can close this.
comment:7 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Never mind.. I see that it's been applied and it's in the new regression repo version. So closing.
After discussion on the testing mailing list ("Submodules not cleaned"), this was fixed on the develop branch (commit ac7fc73f).
It later turned out that the quoting used in the Python code gave an error with Git 1.9 on Windows (testing list "New Windows Runner reset hard error"). I'm attaching a patch that fixes it. It works for me with both Git 1.8.3 and 1.9.2 on Windows and Git 1.9.2 on QNX and for Tom Kent on Windows.