public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
new feature: prompt to push a tag to remotes after tag creation
timcharper (author)
Fri Apr 04 17:53:51 -0700 2008
commit  a93e349ff65dc519eaa315e9754bf9adef303eca
tree    4cdb2e3671a79232303106694a9ad1db6728a836
parent  3d45d679013eddb66bc6eafb483c6d32eb7a4ea0
...
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
 
20
21
22
...
24
25
26
27
 
28
29
30
...
6
7
8
 
 
 
9
 
 
 
 
 
 
 
10
11
12
13
14
...
16
17
18
 
19
20
21
22
0
@@ -6,17 +6,9 @@
0
   <string>nop</string>
0
   <key>command</key>
0
   <string>#!/usr/bin/env ruby
0
-require ENV['TM_BUNDLE_SUPPORT'] + '/environment.rb'
0
-require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'
0
-require ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb'
0
 
0
-if name = TextMate::UI.request_string(:title =&gt; "Create Tag", :prompt =&gt; "Enter the name of the new tag:")
0
- git = SCM::Git.new
0
- git_base = File.expand_path('..', git.git_dir(git.paths.first))
0
- git.create_tag(name, git_base)
0
- puts "Tag #{name} created"
0
-end
0
-</string>
0
+require ENV['TM_BUNDLE_SUPPORT'] + '/environment.rb'
0
+dispatch :controller =&gt; "tag", :action =&gt; "create"</string>
0
   <key>input</key>
0
   <string>none</string>
0
   <key>keyEquivalent</key>
0
@@ -24,7 +16,7 @@ end
0
   <key>name</key>
0
   <string>Create Tag…</string>
0
   <key>output</key>
0
- <string>showAsTooltip</string>
0
+ <string>showAsHTML</string>
0
   <key>uuid</key>
0
   <string>C6CD5A2A-E1DA-4D94-B561-331A2366AAC8</string>
0
 </dict>
...
90
91
92
 
93
94
95
...
90
91
92
93
94
95
96
0
@@ -90,6 +90,7 @@ class RemoteController < ApplicationController
0
     end
0
     
0
     def display_push_output(output)
0
+ flush
0
       if ! output[:pushes].empty?
0
         puts "<pre>#{output[:text]}</pre>"
0
         output_branch_logs(output[:pushes])
...
139
140
141
142
143
144
145
 
 
146
 
147
148
149
...
242
243
244
 
245
246
247
...
139
140
141
 
 
 
 
142
143
144
145
146
147
148
...
241
242
243
244
245
246
247
0
@@ -139,11 +139,10 @@ module SCM
0
       command("ls-files", *params).split("\n")
0
     end
0
     
0
- def create_tag(name, git_file)
0
- base = File.expand_path("..", git_dir(git_file))
0
- Dir.chdir(base)
0
-
0
+ def create_tag(name)
0
+ chdir_base
0
       %x{#{command_str("tag", name)}}
0
+ true
0
     end
0
   
0
     def revert(paths = [])
0
@@ -242,6 +241,7 @@ module SCM
0
       options = options.dup
0
       args = ["push", source]
0
       args << options.delete(:branch) if options[:branch]
0
+ args << options.delete(:tag) if options[:tag]
0
       
0
       p = popen_command(*args)
0
       process_push(p, options)

Comments

    No one has commented yet.