Permalink
Browse files

fixed 'Add File(s) to Repository' command to work with current docume…

…nt, sans project; also set to show Add command output in tooltip

git-svn-id: http://svn.textmate.org/trunk/Bundles/Darcs.tmbundle@8030 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 6ca6c5d commit 2c61440ed7f3d3685740970ababb63de080c6fc9 Paul Bissex committed Aug 26, 2007
Showing with 4 additions and 4 deletions.
  1. +4 −4 Commands/Add to repository.plist
@@ -12,18 +12,18 @@ if [[ -z $TM_SELECTED_FILES ]]; then
else
DARCSPaths="$TM_SELECTED_FILES";
fi
-
+export DARCSPaths
"${TM_RUBY:=ruby}" <<'EOF'
require 'pathname'
basedir = Pathname.new(ENV['TM_DIRECTORY']).realpath()
addlist = Array.new()
-ENV['TM_SELECTED_FILES'].split(/' '/).each() { |addfile|
+ENV['DARCSPaths'].split(/' '/).each() { |addfile|
addfile = addfile[/^'?(.*?)'?$/, 1]
addlist << "'#{Pathname.new(addfile).realpath.relative_path_from(basedir).to_s.gsub(/(')/, "\\\1")}'"
}
-output = `darcs add -r #{addlist.join(' ')}`
+output = `darcs add -v -r #{addlist.join(' ')}`
puts(output)</string>
<key>input</key>
<string>none</string>
@@ -32,7 +32,7 @@ puts(output)</string>
<key>name</key>
<string>Add File(s) to Repository</string>
<key>output</key>
- <string>discard</string>
+ <string>showAsTooltip</string>
<key>uuid</key>
<string>81229AD0-DE5C-11D9-823F-000A95A51A76</string>
</dict>

0 comments on commit 2c61440

Please sign in to comment.