Opened 8 years ago

Closed 8 years ago

#10036 closed Bugs (fixed)

Submodules not cleaned

Reported by: Niklas Angare <li51ckf02@…> 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)

regression.py.patch (757 bytes ) - added by Niklas Angare <li51ckf02@…> 8 years ago.
Fix for unknown option hard

Download all attachments as: .zip

Change History (8)

comment:1 by Niklas Angare <li51ckf02@…>, 8 years ago

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.

by Niklas Angare <li51ckf02@…>, 8 years ago

Attachment: regression.py.patch added

Fix for unknown option hard

comment:2 by Thomas Kent <teeks99@…>, 8 years ago

I've got a runner that can't be set to run automatically until this patch is committed.

comment:3 by anonymous, 8 years ago

Just pushed this to develop.

comment:4 by Thomas Kent <teeks99@…>, 8 years ago

I see that it was pushed to develop, then backed out again? Was there a problem?

comment:5 by Noel Belcourt, 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.

in reply to:  5 comment:6 by René Rivera, 8 years ago

Owner: changed from René Rivera to Noel Belcourt

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 René Rivera, 8 years ago

Resolution: fixed
Status: newclosed

Never mind.. I see that it's been applied and it's in the new regression repo version. So closing.

Note: See TracTickets for help on using tickets.