Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch to using requiredCommands.

  • Loading branch information...
commit c12c44076eec1988631e59a08cc5b205a4083604 1 parent bc092a4
@infininight infininight authored
View
47 Commands/Latest Revision (HEAD).plist
@@ -1,21 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
- <string>#
-# $Id: FileMerge%20With%20Latest%20Revision%20(HEAD).plist 949 2006-04-21 18:02:26Z aparajita $
-#
-
-require_cmd "${TM_SVN:=svn}" "If you have installed svn, then you need to either update your &lt;tt&gt;PATH&lt;/tt&gt; or set the &lt;tt&gt;TM_SVN&lt;/tt&gt; shell variable (e.g. in Preferences / Advanced)"
-
-require_cmd opendiff "You must install the Apple developer tools to run FileMerge."
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# See if the current file is under svn control
FILE=`basename "$TM_FILEPATH"`
-INFO_LINES=`svn info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
+INFO_LINES=`${TM_SVN:-svn} info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
if [ $INFO_LINES -eq 0 ]; then
echo "The current file is not under subversion control"
@@ -26,13 +21,45 @@ fi
</string>
<key>input</key>
<string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@A</string>
<key>name</key>
<string>Latest Revision (HEAD)</string>
- <key>output</key>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
<string>discard</string>
+ <key>requiredCommands</key>
+ <array>
+ <dict>
+ <key>command</key>
+ <string>opendiff</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/bin/opendiff</string>
+ </array>
+ <key>variable</key>
+ <string>TM_OPENDIFF</string>
+ </dict>
+ <dict>
+ <key>command</key>
+ <string>svn</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/local/bin/svn</string>
+ <string>/opt/local/bin/svn</string>
+ </array>
+ <key>variable</key>
+ <string>TM_SVN</string>
+ </dict>
+ </array>
<key>uuid</key>
<string>BA930D7C-7B5E-4BFE-9293-6B8FAF962990</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
View
47 Commands/Previous Revision (PREV).plist
@@ -1,21 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
- <string>#
-# $Id: FileMerge%20With%20Previous%20Revision%20(PREV).plist 949 2006-04-21 18:02:26Z aparajita $
-#
-
-require_cmd "${TM_SVN:=svn}" "If you have installed svn, then you need to either update your &lt;tt&gt;PATH&lt;/tt&gt; or set the &lt;tt&gt;TM_SVN&lt;/tt&gt; shell variable (e.g. in Preferences / Advanced)"
-
-require_cmd opendiff "You must install the Apple developer tools to run FileMerge."
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# See if the current file is under svn control
FILE=`basename "$TM_FILEPATH"`
-INFO_LINES=`svn info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
+INFO_LINES=`${TM_SVN:-svn} info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
if [ $INFO_LINES -eq 0 ]; then
echo "The current file is not under subversion control"
@@ -26,13 +21,45 @@ fi
</string>
<key>input</key>
<string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@A</string>
<key>name</key>
<string>Previous Revision (PREV)</string>
- <key>output</key>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
<string>discard</string>
+ <key>requiredCommands</key>
+ <array>
+ <dict>
+ <key>command</key>
+ <string>opendiff</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/bin/opendiff</string>
+ </array>
+ <key>variable</key>
+ <string>TM_OPENDIFF</string>
+ </dict>
+ <dict>
+ <key>command</key>
+ <string>svn</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/local/bin/svn</string>
+ <string>/opt/local/bin/svn</string>
+ </array>
+ <key>variable</key>
+ <string>TM_SVN</string>
+ </dict>
+ </array>
<key>uuid</key>
<string>3FA49AEC-79AA-4E3A-BFDA-FD7E4EF8D0FE</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
View
47 Commands/Revision....plist
@@ -1,21 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
- <string>#
-# $Id: FileMerge%20With%20Revision....plist 949 2006-04-21 18:02:26Z aparajita $
-#
-
-require_cmd "${TM_SVN:=svn}" "If you have installed svn, then you need to either update your &lt;tt&gt;PATH&lt;/tt&gt; or set the &lt;tt&gt;TM_SVN&lt;/tt&gt; shell variable (e.g. in Preferences / Advanced)"
-
-require_cmd opendiff "You must install the Apple developer tools to run FileMerge."
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# See if the current file is under svn control
FILE=`basename "$TM_FILEPATH"`
-INFO_LINES=`svn info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
+INFO_LINES=`${TM_SVN:-svn} info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
if [ $INFO_LINES -eq 0 ]; then
echo "The current file is not under subversion control"
@@ -51,13 +46,45 @@ REV=`echo "$revs" | tr '\r' '\n' | awk -F '|' '{ print substr($1, 2) }'`
"$TM_BUNDLE_SUPPORT/bin/filemerge.sh" $REV -</string>
<key>input</key>
<string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@A</string>
<key>name</key>
<string>Revision...</string>
- <key>output</key>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
<string>discard</string>
+ <key>requiredCommands</key>
+ <array>
+ <dict>
+ <key>command</key>
+ <string>opendiff</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/bin/opendiff</string>
+ </array>
+ <key>variable</key>
+ <string>TM_OPENDIFF</string>
+ </dict>
+ <dict>
+ <key>command</key>
+ <string>svn</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/local/bin/svn</string>
+ <string>/opt/local/bin/svn</string>
+ </array>
+ <key>variable</key>
+ <string>TM_SVN</string>
+ </dict>
+ </array>
<key>uuid</key>
<string>F0B1A94F-3FC5-47B8-8771-FFF4EF230156</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
View
47 Commands/Revisions....plist
@@ -1,21 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
- <string>#
-# $Id: FileMerge%20Revisions....plist 949 2006-04-21 18:02:26Z aparajita $
-#
-
-require_cmd "${TM_SVN:=svn}" "If you have installed svn, then you need to either update your &lt;tt&gt;PATH&lt;/tt&gt; or set the &lt;tt&gt;TM_SVN&lt;/tt&gt; shell variable (e.g. in Preferences / Advanced)"
-
-require_cmd opendiff "You must install the Apple developer tools to run FileMerge."
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# See if the current file is under svn control
FILE=`basename "$TM_FILEPATH"`
-INFO_LINES=`svn info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
+INFO_LINES=`${TM_SVN:-svn} info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
if [ $INFO_LINES -eq 0 ]; then
echo "The current file is not under subversion control"
@@ -63,13 +58,45 @@ revs=( $revs )
</string>
<key>input</key>
<string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@A</string>
<key>name</key>
<string>Revisions...</string>
- <key>output</key>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
<string>discard</string>
+ <key>requiredCommands</key>
+ <array>
+ <dict>
+ <key>command</key>
+ <string>opendiff</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/bin/opendiff</string>
+ </array>
+ <key>variable</key>
+ <string>TM_OPENDIFF</string>
+ </dict>
+ <dict>
+ <key>command</key>
+ <string>svn</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/local/bin/svn</string>
+ <string>/opt/local/bin/svn</string>
+ </array>
+ <key>variable</key>
+ <string>TM_SVN</string>
+ </dict>
+ </array>
<key>uuid</key>
<string>9029E141-4526-4ED8-95B2-2A4E19BAD402</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
View
47 Commands/Working Copy (BASE).plist
@@ -1,21 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
- <string>#
-# $Id: FileMerge%20With%20Working%20Copy%20(BASE).plist 949 2006-04-21 18:02:26Z aparajita $
-#
-
-require_cmd "${TM_SVN:=svn}" "If you have installed svn, then you need to either update your &lt;tt&gt;PATH&lt;/tt&gt; or set the &lt;tt&gt;TM_SVN&lt;/tt&gt; shell variable (e.g. in Preferences / Advanced)"
-
-require_cmd opendiff "You must install the Apple developer tools to run FileMerge."
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# See if the current file is under svn control
FILE=`basename "$TM_FILEPATH"`
-INFO_LINES=`svn info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
+INFO_LINES=`${TM_SVN:-svn} info "$FILE" 2&gt;&amp;1 | grep "^Path\: .*\$" | wc -l`
if [ $INFO_LINES -eq 0 ]; then
echo "The current file is not under subversion control"
@@ -26,13 +21,45 @@ fi
</string>
<key>input</key>
<string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@A</string>
<key>name</key>
<string>Working Copy (BASE)</string>
- <key>output</key>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
<string>discard</string>
+ <key>requiredCommands</key>
+ <array>
+ <dict>
+ <key>command</key>
+ <string>opendiff</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/bin/opendiff</string>
+ </array>
+ <key>variable</key>
+ <string>TM_OPENDIFF</string>
+ </dict>
+ <dict>
+ <key>command</key>
+ <string>svn</string>
+ <key>locations</key>
+ <array>
+ <string>/usr/local/bin/svn</string>
+ <string>/opt/local/bin/svn</string>
+ </array>
+ <key>variable</key>
+ <string>TM_SVN</string>
+ </dict>
+ </array>
<key>uuid</key>
<string>9F8B60D0-0535-4B92-8A02-A5AF47BE5306</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
View
6 Support/bin/filemerge.sh
@@ -15,7 +15,7 @@ fi
# See if there is any difference between the revisions
FILE=`basename "$TM_FILEPATH"`
-SIZE=`svn diff -r "$REVS" "$FILE" | wc -m`
+SIZE=`${TM_SVN:-svn} diff -r "$REVS" "$FILE" | wc -m`
if [ $SIZE -eq 0 ]; then
echo "No difference"
@@ -33,9 +33,9 @@ svn cat -r "$1" "$FILE" > "$OLDPATH"
# of it with which to compare.
if [ "$2" != "-" ]; then
NEWPATH=${OLDPATH}.2
- svn cat -r "$2" "$FILE" > "$NEWPATH"
+ ${TM_SVN:-svn} cat -r "$2" "$FILE" > "$NEWPATH"
else
NEWPATH="$TM_FILEPATH"
fi
-opendiff "$OLDPATH" "$NEWPATH" &>/dev/null &
+${TM_OPENDIFF:-opendiff} "$OLDPATH" "$NEWPATH" &>/dev/null &
Please sign in to comment.
Something went wrong with that request. Please try again.