[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1963,1.1964 make_patch.sh,1
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1963,1.1964 make_patch.sh,1.1,1.2 |
Date: |
Tue, 10 Dec 2002 23:53:40 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet
In directory subversions:/tmp/cvs-serv23768
Modified Files:
ChangeLog make_patch.sh
Log Message:
Warn the user if updates occurred during the "cvs update"
step of "make_patch.sh".
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.1963
retrieving revision 1.1964
diff -C2 -r1.1963 -r1.1964
*** ChangeLog 11 Dec 2002 01:15:00 -0000 1.1963
--- ChangeLog 11 Dec 2002 04:53:37 -0000 1.1964
***************
*** 1,3 ****
--- 1,8 ----
+ 2002-12-11 Dawkins, David <address@hidden>
+
+ * make_patch.sh: warn the user if updates occurred during the
+ "cvs update" step of "make_patch.sh".
+
2002-12-11 Rhys Weatherley <address@hidden>
Index: make_patch.sh
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/make_patch.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** make_patch.sh 24 Jan 2002 06:56:01 -0000 1.1
--- make_patch.sh 11 Dec 2002 04:53:37 -0000 1.2
***************
*** 25,28 ****
--- 25,29 ----
# to be clean up on exit.
CHANGEDFILES="/tmp/mp$$"
+ CHANGEDFILES_COPY="/tmp/cvs_update_$$.log"
COMMENTS="/tmp/mpc$$"
trap 'rm -f ${CHANGEDFILES} ${COMMENTS}' 0 1 2 15
***************
*** 54,67 ****
fi
# Determine the list of files to be patched.
if test -z "$1" ; then
# Contact the CVS server to collect up a list of all changed files.
! echo 'Contacting the CVS server to determine which files have changed
...' 1>&2
if cvs -z3 update -d >${CHANGEDFILES} 2>/dev/null ; then
:
else
echo "${PROGNAME}: 'cvs -z3 update -d' command failed"
exit 1
fi
else
# Use the file list on the command-line.
--- 55,110 ----
fi
+ # Define a function that silently searches for a given pattern.
+ # $? will be 0 if the pattern was found
+ grep_qs()
+ {
+ grep -q -s "$1" $2
+ }
+
# Determine the list of files to be patched.
if test -z "$1" ; then
# Contact the CVS server to collect up a list of all changed files.
! echo 'Contacting the CVS server to determine which files have changed'
1>&2
! echo '(this will update your source tree).' 1>&2
if cvs -z3 update -d >${CHANGEDFILES} 2>/dev/null ; then
:
else
echo "${PROGNAME}: 'cvs -z3 update -d' command failed"
+
+ # We can get here when there are conflicts in the update,
+ # so let the user see the log file.
+ cp ${CHANGEDFILES} ${CHANGEDFILES_COPY}
+ echo "(See ${CHANGEDFILES_COPY} for details)." 1>&2
+ exit 1
+ fi
+
+ grep_qs "^[UP] " ${CHANGEDFILES}
+ if test $? -eq 0 ; then
+ echo 'Your source tree was not up-to-date. Please check that
you still' 1>&2
+ echo 'have a clean build, and then rerun this script.' 1>&2
+ cp ${CHANGEDFILES} ${CHANGEDFILES_COPY}
+ echo "(See ${CHANGEDFILES_COPY} for details)." 1>&2
+ exit 1
+ fi
+
+ grep_qs "^C " ${CHANGEDFILES}
+ if test $? -eq 0 ; then
+ echo 'There were conflicts during the update of your source
tree.' 1>&2
+ echo 'Please fix them before rerunning this script.' 1>&2
+ cp ${CHANGEDFILES} ${CHANGEDFILES_COPY}
+ echo "(See ${CHANGEDFILES_COPY} for details)." 1>&2
+ exit 1
+ fi
+
+ grep_qs "^Merging differences" ${CHANGEDFILES}
+ if test $? -eq 0 ; then
+ echo 'Your source tree was not up-to-date (merges were made).'
1>&2
+ echo 'Please check that you still have a clean build, and then'
1>&2
+ echo 'rerun this script.' 1>&1
+ cp ${CHANGEDFILES} ${CHANGEDFILES_COPY}
+ echo "(See ${CHANGEDFILES_COPY} for details)." 1>&2
exit 1
fi
+
else
# Use the file list on the command-line.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1963,1.1964 make_patch.sh,1.1,1.2,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1962,1.1963 configure.in,1.95,1.96
- Next by Date:
[Dotgnu-pnet-commits] CVS: cscctest/csharp/class property6.cs,NONE,1.1 property6.il,NONE,1.1 property6.jl,NONE,1.1 Makefile.am,1.29,1.30
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1962,1.1963 configure.in,1.95,1.96
- Next by thread:
[Dotgnu-pnet-commits] CVS: cscctest/csharp/class property6.cs,NONE,1.1 property6.il,NONE,1.1 property6.jl,NONE,1.1 Makefile.am,1.29,1.30
- Index(es):