mergemaster annoyance or not?

Doug Barton dougb at FreeBSD.org
Fri Mar 13 01:39:13 PDT 2009


-----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-----
-------------- next part --------------
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


More information about the freebsd-stable mailing list