mg-update-live: New script
PATCH 1/1 mg-update-live: New script
This is for deploying an emergency update under the feet of all running tests.
Signed-off-by Ian Jackson <[email protected]>
--- mg-update-live | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 mg-update-live
mg-update-live new file +46 -0
@@ -0,0 +1,46 @@ +#!/bin/bash +# +# for updating live trees from a bad commit + +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2009-2013 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# usage is something like: +# cd ~osstest +# for f in branches/*.git; do ./update-live 3c464fbf8a05b24f4afb7e58bcf4ae77fbb7ad0c $f; done + +set -e +bad="$1" +dir="$2" + +case "$dir" in +branches/for-*.git) ;; +bisects/for-*.git) ;; +*) echo >&2 'bad dir'; exit 1;; +esac + +cd $dir + +head="`git rev-parse HEAD~0`" + +if [ "x$head" != "x$bad" ]; then + echo ok + exit 0 +fi + +git fetch /home/osstest/testing.git production + +git merge --ff-only FETCH_HEAD
Signature · 1 line
1.7.10.4
Ian Jackson writes ("[OSSTEST PATCH] mg-update-live: New script"):
Quoted 2 lines
This is for deploying an emergency update under the feet of all running tests.
FYI, I actually ran a slightly earlier version of this script so I think we shouldn't see any more broken emails. About a dozen trees were updated.
Ian.