Comment 0 for bug 1892101

Revision history for this message
Paul Collins (pjdc) wrote :

Recently I updated a collect file to fetch from a specified branch instead of the default branch.

"mojo collect" still finished successfully but the repo remained on the original branch.

I would expect in this case for codetree to complain about the change in source, much as it does when the source itself is changed, and to require overwrite=True to proceed.

$ cat $MOJO_SPEC/$MOJO_STAGE/../collect
mattermost git+https://git.launchpad.net/charm-k8s-mattermost;branch=built
$ mojo collect
[...]
2020-08-18 22:25:21 [INFO] Updating repository at mattermost from refs/remotes/origin/master
2020-08-18 22:25:21 [INFO] Repository mattermost at revision 2b68f795ca392937568a21349d56c61e15892d49
[...]
$ git -C /srv/mojo/mojo-prod-mattermost/xenial/production/build/mattermost branch
* master
$ rm -rf /srv/mojo/mojo-prod-mattermost/xenial/production/build/mattermost
$ rm -rf /srv/mojo/mojo-prod-mattermost/xenial/production/charms/xenial/mattermost
$ mojo collect
[...]
2020-08-18 22:35:14 [INFO] Cloning repository at mattermost from https://git.launchpad.net/charm-k8s-mattermost
2020-08-18 22:35:15 [INFO] Repository mattermost at revision b261ac7a54e390bb0f0e2b8a5db911786ebb2a91
[...]
$ git -C /srv/mojo/mojo-prod-mattermost/xenial/production/build/mattermost branch
* built
$ _