From: Ian Jackson Subject: [OSSTEST PATCH] mg-update-live: New script Date: Fri, 3 Jul 2015 12:01:18 +0100 Message-ID: <1435921278-16850-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZAyis-0000M1-A1 for xen-devel@lists.xenproject.org; Fri, 03 Jul 2015 11:01:34 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org This is for deploying an emergency update under the feet of all running tests. Signed-off-by: Ian Jackson --- mg-update-live | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 mg-update-live diff --git a/mg-update-live b/mg-update-live new file mode 100755 index 0000000..f1d24cd --- /dev/null +++ b/mg-update-live @@ -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 . + +# 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 -- 1.7.10.4