From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Nov 24 11:50:06 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE3A316A407 for ; Fri, 24 Nov 2006 11:50:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id B25AE43D5A for ; Fri, 24 Nov 2006 11:49:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kAOBo5sT043777 for ; Fri, 24 Nov 2006 11:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kAOBo5DS043773; Fri, 24 Nov 2006 11:50:05 GMT (envelope-from gnats) Resent-Date: Fri, 24 Nov 2006 11:50:05 GMT Resent-Message-Id: <200611241150.kAOBo5DS043773@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, NIIMI Satoshi Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E824216A415 for ; Fri, 24 Nov 2006 11:43:56 +0000 (UTC) (envelope-from sa2c@sa2c.net) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 867D943D49 for ; Fri, 24 Nov 2006 11:43:14 +0000 (GMT) (envelope-from sa2c@sa2c.net) Received: by py-out-1112.google.com with SMTP id f31so481320pyh for ; Fri, 24 Nov 2006 03:43:55 -0800 (PST) Received: by 10.35.96.7 with SMTP id y7mr5660640pyl.1164368634438; Fri, 24 Nov 2006 03:43:54 -0800 (PST) Received: from berkeley.l.sa2c.net ( [125.192.101.90]) by mx.google.com with ESMTP id n67sm9242623pyh.2006.11.24.03.43.53; Fri, 24 Nov 2006 03:43:54 -0800 (PST) Received: by berkeley.l.sa2c.net (Postfix, from userid 3104) id E333240E4; Fri, 24 Nov 2006 20:43:45 +0900 (JST) Message-Id: <20061124114345.E333240E4@berkeley.l.sa2c.net> Date: Fri, 24 Nov 2006 20:43:45 +0900 (JST) From: NIIMI Satoshi To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/105813: devel/mercurial: hgmerge does not work X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: NIIMI Satoshi List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Nov 2006 11:50:06 -0000 >Number: 105813 >Category: ports >Synopsis: devel/mercurial: hgmerge does not work >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 24 11:50:04 GMT 2006 >Closed-Date: >Last-Modified: >Originator: NIIMI Satoshi >Release: FreeBSD 6.1-RELEASE-p10 i386 >Organization: >Environment: System: FreeBSD berkeley.l.sa2c.net 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #17: Sun Oct 1 13:00:54 JST 2006 root@berkeley.l.sa2c.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: Unlike bash and ksh, FreeBSD's /bin/sh behaves: | % sh -c 'type /nonexistent; echo $?' | /nonexistent: No such file or directory | 0 Because of above, testing "/Developer/.../FileMerge" and "/usr/bin/test" always succeeds and they are used unconditionally. >How-To-Repeat: Run "hg merge" with clean ~/.hgrc and HGMERGE environment variable. >Fix: --- mercurial.diff begins here --- --- devel/mercurial/Makefile Thu Nov 23 16:44:43 2006 +0000 +++ devel/mercurial/Makefile Fri Nov 24 05:55:36 2006 +0900 @@ -7,6 +7,7 @@ PORTNAME= mercurial PORTVERSION= 0.9.1 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= http://www.selenic.com/mercurial/release/ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ devel/mercurial/files/patch-hgmerge Fri Nov 24 05:48:06 2006 +0900 @@ -0,0 +1,63 @@ +--- hgmerge Tue Nov 21 23:08:29 2006 -0200 ++++ hgmerge Fri Nov 24 05:27:38 2006 +0900 +@@ -20,6 +20,18 @@ if [ -z "$EDITOR" ]; then + if [ -z "$EDITOR" ]; then + EDITOR="vi" + fi ++ ++isexecutable () ++{ ++ case "$1" in ++ */*) ++ [ -x "$1" ] && return 0 || return 1 ++ ;; ++ *) ++ type "$1" >/dev/null 2>&1 && return 0 || return 1 ++ ;; ++ esac ++} + + # find decent versions of our utilities, insisting on the GNU versions where we + # need to +@@ -28,13 +40,13 @@ DIFF="gdiff" + DIFF="gdiff" + PATCH="gpatch" + +-type "$MERGE" >/dev/null 2>&1 || MERGE= +-type "$DIFF3" >/dev/null 2>&1 || DIFF3="diff3" ++isexecutable "$MERGE" || MERGE= ++isexecutable "$DIFF3" || DIFF3="diff3" + $DIFF3 --version >/dev/null 2>&1 || DIFF3= +-type "$DIFF" >/dev/null 2>&1 || DIFF="diff" +-type "$DIFF" >/dev/null 2>&1 || DIFF= +-type "$PATCH" >/dev/null 2>&1 || PATCH="patch" +-type "$PATCH" >/dev/null 2>&1 || PATCH= ++isexecutable "$DIFF" || DIFF="diff" ++isexecutable "$DIFF" || DIFF= ++isexecutable "$PATCH" || PATCH="patch" ++isexecutable "$PATCH" || PATCH= + + # find optional visual utilities + FILEMERGE="/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge" +@@ -42,15 +54,15 @@ TKDIFF="tkdiff" + TKDIFF="tkdiff" + MELD="meld" + +-type "$FILEMERGE" >/dev/null 2>&1 || FILEMERGE= +-type "$KDIFF3" >/dev/null 2>&1 || KDIFF3= +-type "$TKDIFF" >/dev/null 2>&1 || TKDIFF= +-type "$MELD" >/dev/null 2>&1 || MELD= ++isexecutable "$FILEMERGE" || FILEMERGE= ++isexecutable "$KDIFF3" || KDIFF3= ++isexecutable "$TKDIFF" || TKDIFF= ++isexecutable "$MELD" || MELD= + + # Hack for Solaris + TEST="/usr/bin/test" +-type "$TEST" >/dev/null 2>&1 || TEST="/bin/test" +-type "$TEST" >/dev/null 2>&1 || TEST="test" ++isexecutable "$TEST" || TEST="/bin/test" ++isexecutable "$TEST" || TEST="test" + + # random part of names + RAND="$RANDOM$RANDOM" --- mercurial.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: