tg-update: automatically set up newly picked up remote deps
commita3701f6b64450fbc390b4e99bbd9c20528fd3c46
authorKyle J. McKay <mackyle@gmail.com>
Thu, 23 Mar 2017 16:50:19 +0000 (23 09:50 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 23 Mar 2017 16:50:19 +0000 (23 09:50 -0700)
treec25efc2f9bce1a53e9de6e26030da114a7ce4207
parent5dbdb4175f18f1cbb04802761855d44a6dcb15ce
tg-update: automatically set up newly picked up remote deps

Now that remote branch changes to .topmsg and .topdeps are
being properly picked up and merged in when a remote is
present during an update, automatically set up any not-yet-
existing local branches when the remote adds a new dependency.

This workflow now has much more seamless operation:

 1) remote site creates a new branch with 'tg create'
 2) remote site adds that to an existing branch as a dependency
 3) local site pulls from remote and gets updates and new branch
 4) local site runs tg update with remote set to remote site
 5) new dependency gets merged into local topic branch
 6) addition of dependency triggers auto local creation of new branch
 7) local site runs tg update later and it still works

Historically (5) never happened as any remote branch updates to
.topdeps or .topmsg were silently discarded during the tg update
operation.  Now, however, they get picked up.

Without (6) future (7) will fail with an annoying complaint
causing much unpleasantness and unwanted outbursts.

The above scenario does not automatically create local branches
for new remote branches that are not depended on by any
pre-existing local branches (via their remote branch).

However, if a staging branch is being used then it would always
end up getting a new dependency on any new branch thereby causing
the new local branch to be automatically set up when the remote
staging branch update is merged in at tg update time.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
README
hooks/pre-commit.sh
tg-update.sh
tg.sh