Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Nov 22, 2008
2 parents fa14e05 + a965ac0 commit 51ef40e
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,3 +1,4 @@
- Visualize History with GitX (Matthias Granberry)
- Local config settings for Log Limit and Log Context Lines were always saved to global and not saving to local.
- Fix git gui invocation (Thanks, Pedro Melo)

Expand Down
23 changes: 23 additions & 0 deletions Commands/Use GitX.tmCommand
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby
require ENV['TM_BUNDLE_SUPPORT'] + '/environment.rb'
dispatch(:controller =&gt; "misc", :action =&gt; "gitx")
</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>^G</string>
<key>name</key>
<string>Visualize History with GitX</string>
<key>output</key>
<string>discard</string>
<key>uuid</key>
<string>1C12DE42-78A9-4DCA-BB55-2B8E6328C72D</string>
</dict>
</plist>
10 changes: 10 additions & 0 deletions Support/app/controllers/misc_controller.rb
Expand Up @@ -23,6 +23,16 @@ def gitnub
end
end

def gitx
cmd = first_which(git.config["git-tmbundle.gitx-path"], "gitx", "/Applications/GitX.app/Contents/Resources/gitx")
if cmd
run_detached("cd '#{ENV['TM_DIRECTORY']}';" + cmd, "GitX")
else
puts "Unable to find GitX. Use the config dialog to set the GitX path to where you've installed it."
output_show_tool_tip
end
end

protected
def first_which(*args)
args.map do |arg|
Expand Down
4 changes: 2 additions & 2 deletions Support/app/controllers/remote_controller.rb
Expand Up @@ -179,7 +179,7 @@ def progress_start(remote_name, state, count)

def progress(remote_name, state, percentage, index, count)
puts <<-EOF
<script language='JavaScript'>
<script type='text/javascript'>
$('#{remote_name}_#{state}_progress').update('#{percentage}% #{index} / #{count}')
</script>
EOF
Expand All @@ -189,7 +189,7 @@ def progress(remote_name, state, percentage, index, count)

def progress_end(remote_name, state, count)
puts <<-EOF
<script language='JavaScript'>
<script type='text/javascript'>
$('#{remote_name}_#{state}_progress').update('Done')
</script>
EOF
Expand Down
2 changes: 1 addition & 1 deletion Support/app/views/annotate/index.html.erb
Expand Up @@ -2,7 +2,7 @@
<% render "_content", :locals => { :annotations => @annotations, :revision => @revision } %>
<% content_for :javascript do %>
<script language='JavaScript'>
<script type='text/javascript'>
function show_annotation(revision)
{
$('content').update( dispatch({controller: 'annotate', action: "update", revision: revision}) );
Expand Down
1 change: 1 addition & 0 deletions Support/app/views/config/index.html.erb
Expand Up @@ -22,6 +22,7 @@
["Show diff check (yes or no)", "git-tmbundle.show-diff-check", [:global, :local], {:style => "width: 40px"}],
[],
["Gitnub path", "git-tmbundle.gitnub-path", [:global], {:style => "width: 250px"}],
["GitX path", "git-tmbundle.gitx-path", [:global], {:style => "width: 250px"}],
].each do |label, key, scopes, input_options|
%>
<tr>
Expand Down
17 changes: 0 additions & 17 deletions Support/tmvc/lib/application_controller.rb
Expand Up @@ -163,20 +163,3 @@ def output_show_tool_tip
$exit_status = EXIT_SHOW_TOOL_TIP
end
end

class Mutex
def pass_lock
Thread.pass
lock
end

def unlock_pass
Thread.pass
unlock
end

def wait_for_lock
pass_lock
unlock_pass
end
end
1 change: 1 addition & 0 deletions info.plist
Expand Up @@ -35,6 +35,7 @@
<string>------------------------------------</string>
<string>20F5C491-F71C-4963-9C61-DF7294976550</string>
<string>1FF5FF82-13A0-4C83-BAD6-D67AE8180FA9</string>
<string>1C12DE42-78A9-4DCA-BB55-2B8E6328C72D</string>
<string>D0DF4B19-F311-48CC-BF68-F8B33CD051D3</string>
<string>7CE2C842-EBC4-443C-8DDB-3B16AC593D9A</string>
<string>B3577B4D-A3F1-4CB4-94B0-7A87CA658664</string>
Expand Down

0 comments on commit 51ef40e

Please sign in to comment.