HomePhabricator

Properly abort when git submodule processing fails
1a67501c7089Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Properly abort when git submodule processing fails

The logic to process MediaWiki extensions and skins submodules comes
from the old JJB macro ext-skins-submodules-update. It was written in
shell using find to run the command. Roughly:

find extensions -name .gitmodules -execdir <git submodule commands> \;

When a git submodule command failed, find would keep processing anyway
and exit 0 regardless. The reason is in find documentation:

-execdir command {} ; returns true only if command returns 0.

The 'true' returns value is for the find predicate and does not affect
find exit status.

Port the logic to plain python using os.walk(). Which also mean that
Quibble no more depends on the 'find' utility which would help on
Windows.

Add a test to ensure a failing call causes an exception which is bubbled
up to ext_skin_submodule_update() (and thus abort QuibbleCmd).

Bug: T198980
Change-Id: I3ca48f10a66a8959c1a8b9f8f7d585823f40312a

Details

Provenance
hasharAuthored on Mar 19 2019, 10:15 AM
ChangeId
I3ca48f10a66a8959c1a8b9f8f7d585823f40312a

Commit No Longer Exists

This commit no longer exists in the repository.