Index: files/macos-askpass
===================================================================
--- files/macos-askpass	(revision 0)
+++ files/macos-askpass	(revision 0)
@@ -0,0 +1,27 @@
+#! /bin/sh  
+
+#
+# An SSH_ASKPASS command for MacOS X
+#
+# Author: Joseph Mocker, Sun Microsystems  
+
+#
+# To use this script:
+#     setenv SSH_ASKPASS "macos-askpass"
+#     setenv DISPLAY ":0"
+#  
+
+TITLE=${MACOS_ASKPASS_TITLE:-"SSH"}  
+
+DIALOG="display dialog \"$@\" default answer \"\" with title \"$TITLE\""
+DIALOG="$DIALOG with icon caution with hidden answer"  
+
+result=`osascript -e 'tell application "Finder"' -e "activate"  -e "$DIALOG" -e 'end tell'`  
+
+if [ "$result" = "" ]; then
+    exit 1
+else
+    echo "$result" | sed -e 's/^text returned://' -e 's/, button returned:.*$//'
+    exit 0
+fi  
+

Property changes on: files/macos-askpass
___________________________________________________________________
Added: svn:executable
   + *

Index: files/TortoiseHg.in
===================================================================
--- files/TortoiseHg.in	(revision 79239)
+++ files/TortoiseHg.in	(working copy)
@@ -1,3 +1,8 @@
 #!/bin/bash
 
+if [ -z "$SSH_ASKPASS" ]; then
+	SSH_ASKPASS=`dirname $0`/macos-askpass
+	export SSH_ASKPASS
+fi
+
 exec "@PREFIX@/bin/thg"
