Date: Mon, 22 Jan 2001 23:24:00 +0000 From: Tony Finch <dot@dotat.at> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/24564: local ident strings interfere with mergemaster Message-ID: <E14KqJc-000311-00@hand.dotat.at>
next in thread | raw e-mail | index | archive | help
>Number: 24564 >Category: bin >Synopsis: local ident strings interfere with mergemaster >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jan 22 15:30:02 PST 2001 >Closed-Date: >Last-Modified: >Originator: Tony Finch >Release: FreeBSD 4.2-BETA-20001113 i386 >Organization: Covalent Technologies Inc. >Environment: FreeBSD hand.dotat.at 4.2-BETA-20001113 FreeBSD 4.2-BETA-20001113 #0: Tue Nov 14 00:42:35 UTC 2000 fanf@hand.dotat.at:/FreeBSD/obj/FreeBSD/releng4/sys/DELL-Latitude-CPx i386 >Description: Mergemaster has a "non-strict comparison" facility for ignoring local changes to files if the cvs idents have not been changed from the standard version of the file. This makes mergemaster runs much less time-consuming. However, if (like me) you keep system configuration files in CVS then the ident strings will no longer match exactly, and the benefit of non-strict comparisons is lost. This problem can be avoided by ignoring extra ident strings in the destination file, and instead only checking that all the ident strings in the source file are present in the destination file. >How-To-Repeat: >Fix: Index: mergemaster.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v retrieving revision 1.6.2.5 diff -u -r1.6.2.5 mergemaster.sh --- mergemaster.sh 2000/11/09 00:51:38 1.6.2.5 +++ mergemaster.sh 2001/01/22 23:09:56 @@ -671,21 +669,24 @@ case "${STRICT}" in '' | [Nn][Oo]) - # Compare CVS $Id's first so if the file hasn't been modified - # local changes will be ignored. - # If the files have the same $Id, delete the one in temproot so the - # user will have less to wade through if files are left to merge by hand. + # Ignore local changes unless the source file has changed, which + # we detect by looking at ident strings: + # If the destination file has all of the ident strings of the + # temproot file, then delete the temproot file so the user will + # have less to wade through if files are left to merge by hand. + # We allow the user to add local ident strings which are ignored. # - # Reduce complexity and improve portability by using ident - # - CVSID1=`ident ${DESTDIR}${COMPFILE#.} 2>&1` - CVSID1="${CVSID1#${DESTDIR}}" - CVSID2=`ident ${COMPFILE} 2>&1` - - case "${CVSID2}" in - *'no id keywords'*) - ;; - ."${CVSID1}") + ALL_PRESENT=YES + ident ${COMPFILE} 2>&1 | { + read DISCARD_FILENAME + while read IDENT_STRING; do + if ident ${DESTDIR}${COMPFILE#.} 2>&1 | fgrep -qv "${IDENT_STRING}"; then + ALL_PRESENT=NO + fi + done + } + case "${ALL_PRESENT}" in + [Yy][Es][Ss]) echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" rm "${COMPFILE}" ;; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E14KqJc-000311-00>