WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [PATCH] minor fix for sparse-merge

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-ia64-devel] [PATCH] minor fix for sparse-merge
From: Aron Griffis <aron@xxxxxx>
Date: Fri, 19 May 2006 11:12:02 -0400
Delivery-date: Fri, 19 May 2006 08:25:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060519135155.GA12882@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
References: <20060519135155.GA12882@xxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
A follow-on patch to the last one, checks SPARSEDIR for modifications
before allowing the merge.  This removes the need for the FIXME.
Additionally clean up empty diffs at the end of the run.

Signed-off-by: Aron Griffis <aron@xxxxxx>

diff -r 9a7f2ed7714e xen/arch/ia64/tools/sparse-merge
--- a/xen/arch/ia64/tools/sparse-merge  Fri May 19 10:51:30 2006 -0400
+++ b/xen/arch/ia64/tools/sparse-merge  Fri May 19 11:25:32 2006 -0400
@@ -14,16 +14,23 @@
 : ${ARCH:=ia64}
 
 SPARSEDIR=linux-2.6-xen-sparse
+WD=$PWD
 
 if [ ! -d $SPARSEDIR ]; then
        echo "Can't find $SPARSEDIR directory."
        exit
 fi
 
-WD=$PWD
-# We want the linux upsream tree to be at the OLDTAG to get the OLDTAG-Xen 
diff.
+# Check for modified files in the sparse tree before starting
+if hg st $SPARSEDIR | head | grep .; then
+    echo
+    echo "$SPARSEDIR contains modifications, please clean it up first"
+    exit
+fi
+
+# We want the linux upstream tree to be at the OLDTAG to get the OLDTAG-Xen 
diff.
 # Save current revision to restore when done
-cd $LINUXPATH
+cd $LINUXPATH || exit 1
 OLDCSET=$(hg parents | awk '/^changeset:/{print($2)}' | cut -f 1 -d :)
 for t in $OLDTAG $NEWTAG; do
     if ! hg tags | cut -f1 -d' ' | grep -Fx $t; then
@@ -36,6 +43,7 @@ for t in $OLDTAG $NEWTAG; do
     fi
 done
 hg up -C $OLDTAG || exit 1
+
 cd $WD
 for i in $(hg manifest | awk '{print($3)}' | grep $SPARSEDIR | grep "$ARCH"); 
do
        cd $WD
@@ -57,9 +65,6 @@ for i in $(hg manifest | awk '{print($3)
 
        cd $DIRNAME
        XENDIR=$(pwd)
-
-       ### FIXME ###
-       hg revert $FILENAME
 
        ORIGPATH=$(echo $i | sed -e "s/^$SPARSEDIR/./")
        APATH=$(echo $i | sed -e "s/^$SPARSEDIR/a/")
@@ -85,7 +90,7 @@ for i in $(hg manifest | awk '{print($3)
                fi
                TONEWREJ=$(wc -l ${FILENAME}.rej | \
                           awk '{print($1)}')
-               hg revert $FILENAME
+               hg st $FILENAME | grep -q . && hg revert $FILENAME
                rm -f ${FILENAME}.rej ${FILENAME}.orig
                diff -uN $DIFFPATH $FILENAME | \
                    sed -e "s,^--- $DIFFPATH,--- $FILENAME," \
@@ -134,6 +139,6 @@ for i in $(hg manifest | awk '{print($3)
                        echo "SUCCESS (Upstream applied)"
        fi
 done
+find $SPARSEDIR -name \*.diff -empty | xargs -r rm -f
 cd $LINUXPATH
 hg up -C $OLDCSET
-cd $WD

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>