+ run git clone $FLABREPO $WORKDIR
+ runcd $WORKDIR
+ run git remote rename origin flab
+ # create branch upstreammaster as the tracking branch for upstream
+ run git checkout -b upstreammaster $EPOCH
+ run git remote add -t upstreammaster -m master upstream $UPSTREAMREPO
+}
+
+function update_local_master () {
+ step "update_local_master"
+ runcd $WORKDIR
+ # pull onelab master onto upstreammaster - should be fast-forward
+ runcheckout upstreammaster
+ msg "pulling upstreammaster from upstream"
+ run git pull $GIT_OPTIONS upstream refs/heads/master:refs/heads/upstreammaster
+ # pull flab master onto master -
+ runcheckout master
+ msg "pulling master from flab"
+ run git pull $GIT_OPTIONS flab refs/heads/master:refs/head/master
+ # merge upstream upon local
+ msg "locally merging upstream into (flab) master"
+ run git pull $GIT_OPTIONS . upstreammaster
+ if [ -n "$PUSH" ] ; then
+ msg pushing master back to flab
+ run git push $GIT_OPTIONS flab refs/heads/master:refs/heads/master
+ fi