From k@numeri.campus.luth.se  Tue Mar 13 05:28:45 2001
Return-Path: <k@numeri.campus.luth.se>
Received: from numeri.campus.luth.se (numeri.campus.luth.se [130.240.197.103])
	by hub.freebsd.org (Postfix) with ESMTP id 79D3437B72A
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Mar 2001 05:28:44 -0800 (PST)
	(envelope-from k@numeri.campus.luth.se)
Received: (from k@localhost)
	by numeri.campus.luth.se (8.11.3/8.11.3) id f2DDT3P04592;
	Tue, 13 Mar 2001 14:29:03 +0100 (CET)
	(envelope-from k)
Message-Id: <200103131329.f2DDT3P04592@numeri.campus.luth.se>
Date: Tue, 13 Mar 2001 14:29:03 +0100 (CET)
From: Johan Karlsson <k@numeri.campus.luth.se>
Reply-To: k@numeri.campus.luth.se
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Let mergemaster not display diffs
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         25771
>Category:       bin
>Synopsis:       Let mergemaster not display diffs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 13 05:30:01 PST 2001
>Closed-Date:    Fri Mar 23 23:28:01 PST 2001
>Last-Modified:  Fri Mar 23 23:30:18 PST 2001
>Originator:     Johan Karlsson
>Release:        FreeBSD 4.3-BETA i386
>Organization:
>Environment:
System: FreeBSD numeri.campus.luth.se 4.3-BETA FreeBSD 4.3-BETA #2: Sat Mar 10 10:14:21 CET 2001 root@numeri.campus.luth.se:/usr/obj/usr/src/sys/NUMERI i386


	
>Description:
	Sometimes I do not want to have to read all the diff
	when running mergemaster but still be able to choose to
	see some diffs.

	I have added an option to mergemaster do disable the
	default view of diff and still allow the user to view
	the diff for the specific files he/she want to see.

	Maybe another letter should be choosed for this option
	but -V is the most natural to me :-)

	
>How-To-Repeat:
	
>Fix:

--- mergemaster.orig	Tue Mar 13 13:54:11 2001
+++ mergemaster	Tue Mar 13 14:21:45 2001
@@ -31,6 +31,7 @@
   echo "  -u N  Specify a numeric umask"
   echo "  -w N  Specify a screen width in columns to sdiff"
   echo '  -D /path/directory  Specify the destination directory to install files to'
+  echo '  -V do not view diffs by default'
   echo ''
 }
 
@@ -103,7 +104,7 @@
 # options
 diff_loop () {
 
-  HANDLE_COMPFILE=v
+  HANDLE_COMPFILE=${VIEW_DIFF}
 
   while [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" -o "${HANDLE_COMPFILE}" = "NOT V" ]; do
     if [ -f "${DESTDIR}${COMPFILE#.}" -a -f "${COMPFILE}" ]; then
@@ -225,7 +226,7 @@
 
 # Check the command line options
 #
-while getopts ":ascrvhim:t:du:w:D:" COMMAND_LINE_ARGUMENT ; do
+while getopts ":ascrvhim:t:du:w:D:V" COMMAND_LINE_ARGUMENT ; do
   case "${COMMAND_LINE_ARGUMENT}" in
   s)
     STRICT=yes
@@ -271,6 +272,9 @@
   D)
     DESTDIR=${OPTARG}
     ;;
+  V)
+    VIEW_DIFF="NOT V"
+    ;;
   *)
     display_usage
     exit 1
@@ -343,6 +347,10 @@
 # Assign the diff flag once so we will not have to keep testing it
 #
 DIFF_FLAG=${DIFF_FLAG:--u}
+
+# Assign the choice to view diff so we will not have to keep testing it
+#
+VIEW_DIFF=${VIEW_DIFF:-v}
 
 # Assign the source directory
 #
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: johan 
Responsible-Changed-When: Tue Mar 13 05:30:46 PST 2001 
Responsible-Changed-Why:  
Over to mergemaster maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25771 
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Fri Mar 23 23:28:01 PST 2001 
State-Changed-Why:  

If you don't want to look at the diffs, there are already  
hooks in the script to let you either automatically install 
or automatically delete those files. As much as I appreciate 
your suggestion, this is a bit too much creeping featurism. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25771 
>Unformatted:
