> One of the reasons I'm doing this is I believe we need a GUI merge 
> program to be shipped by default and I'm trying to find one that suits 
> the Solaris distribution of OpenSolaris.

Yep.   Apropos hg merging program...

/bin/hgmerge defaults to use "vi" as the default merging utility,
when no better alternative is available.

And hgmerge runs the ("vi") editor like this:

# Attempt to do a merge with $EDITOR
if [ -n "$MERGE" -o -n "$DIFF3" ]; then
    echo "conflicts detected in $LOCAL"
    cp "$BACKUP" "$CHGTEST"
    $EDITOR "$LOCAL" || failure
    # Some editors do not return meaningful error codes
    # Do not take any chances
    $TEST "$LOCAL" -nt "$CHGTEST" && success || ask_if_merged
fi



Problem:  Solaris' "vi" returns something like the number of
warnings reported during the edit session as exit status.  In 
case "vi" ever reported a warning or error message during the
edit session, hgmerge thinks the $EDITOR invocation has failed,
and your merge changes that you've made inside "vi" are lost.  :-(


That is, the following will return a non-zero exit status
from "vi":

$ cp  /etc/termcap /tmp/foobar
$ vi /tmp/foobar
[ change something in the file, e.g. insert a line ]
:q
[ prints a warning: "No write since last change (:quit! overrides)" ]
:wq
$ echo $?
1
 
 
This message posted from opensolaris.org
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to