Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Mar 2009 01:39:06 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: mergemaster annoyance or not?
Message-ID:  <49BA1BAA.3080905@FreeBSD.org>
In-Reply-To: <200903121505.n2CF5RXx047734@lurza.secnetix.de>
References:  <200903121505.n2CF5RXx047734@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080906090107050303040501
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

The attached patch adds a -F option to automatically install files
when only the FreeBSD $Ids differ. I've tested this and it seems to do
what the people concerned about this issue are asking for.

If someone affected by this issue could please test this patch and
report back I'd appreciate it.


Doug

- --

    This .signature sanitized for your protection

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)

iEYEAREDAAYFAkm6G6oACgkQyIakK9Wy8PsUXwCg5hPG8G2swKOC0uhRA5L7Q6xb
a7kAn3DKCxL30ggNzTC9EKBhhjMfgpWq
=8U1J
-----END PGP SIGNATURE-----

--------------080906090107050303040501
Content-Type: text/plain;
 name="mergemaster-freebsd-id.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mergemaster-freebsd-id.diff"

Index: mergemaster.sh
===================================================================
--- mergemaster.sh	(revision 189761)
+++ mergemaster.sh	(working copy)
@@ -263,11 +265,14 @@
 
 # Check the command line options
 #
-while getopts ":ascrvhipCPm:t:du:w:D:A:U" COMMAND_LINE_ARGUMENT ; do
+while getopts ":ascrvhipCPm:t:du:w:D:A:FU" COMMAND_LINE_ARGUMENT ; do
   case "${COMMAND_LINE_ARGUMENT}" in
   A)
     ARCHSTRING='TARGET_ARCH='${OPTARG}
     ;;
+  F)
+    FREEBSD_ID=yes
+    ;;
   U)
     AUTO_UPGRADE=yes
     ;;
@@ -1020,6 +1025,20 @@
       # Use more if not.
       # Use unified diffs by default.  Context diffs give me a headache. :)
       #
+
+      # XXX
+      if [ -n "$FREEBSD_ID" ]; then
+	if diff -q -I$FreeBSD:.*[$] "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" > \
+	  /dev/null 2>&1; then
+          if mm_install "${COMPFILE}"; then
+            echo "*** Updated revision control Id for ${DESTDIR}${COMPFILE#.}"
+          else
+            echo "*** Problem installing ${COMPFILE}, it will remain to merge by hand later"
+          fi
+	  continue
+	fi
+      fi
+
       case "${AUTO_RUN}" in
       '')
         # prompt user to install/delete/merge changes

--------------080906090107050303040501--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49BA1BAA.3080905>