public
Rubygem
Description: Git based distributed ticketing system, including a command line client and web viewer
Clone URL: git://github.com/schacon/ticgit.git
Search Repo:
added multiple project support
schacon (author)
Sat Mar 22 10:30:29 -0700 2008
commit  083e620ade8b05402a63d1026692dcf1286eaffd
tree    01e3873c8614a60931e6a9f8925dbc3d94b6a54f
parent  c1c340747343f104046ab8b6a2c5eab38625169c
...
15
16
17
 
 
18
19
20
 
 
21
22
23
...
27
28
29
30
 
31
32
33
...
217
218
219
220
 
221
222
223
...
235
236
237
238
 
239
240
241
...
243
244
245
246
 
247
248
249
...
255
256
257
258
 
259
260
261
...
15
16
17
18
19
20
 
 
21
22
23
24
25
...
29
30
31
 
32
33
34
35
...
219
220
221
 
222
223
224
225
...
237
238
239
 
240
241
242
243
...
245
246
247
 
248
249
250
251
...
257
258
259
 
260
261
262
263
0
@@ -15,9 +15,11 @@
0
       @git = Git.open(git_dir)
0
       @logger = opts[:logger] || Logger.new(STDOUT)
0
       
0
+ proj = Ticket.clean_string(@git.dir.path)
0
+
0
       @tic_dir = opts[:tic_dir] || '~/.ticgit'
0
- @tic_working = opts[:working_directory] || File.expand_path(File.join(@tic_dir, 'working'))
0
- @tic_index = opts[:index_file] || File.expand_path(File.join(@tic_dir, 'index'))
0
+ @tic_working = opts[:working_directory] || File.expand_path(File.join(@tic_dir, proj, 'working'))
0
+ @tic_index = opts[:index_file] || File.expand_path(File.join(@tic_dir, proj, 'index'))
0
 
0
       # load config file
0
       @config_file = File.expand_path(File.join(@tic_dir, 'config.yml'))
0
@@ -27,7 +29,7 @@
0
         @config = {}
0
       end
0
       
0
- @state = File.expand_path(File.join(@tic_dir, , 'state'))
0
+ @state = File.expand_path(File.join(@tic_dir, proj, 'state'))
0
       
0
       if File.exists?(@state)
0
         load_state
0
@@ -217,7 +219,7 @@
0
       @tickets = {}
0
 
0
       bs = git.lib.branches_all.map { |b| b[0] }
0
- init_ticgit_branch if !bs.include?('ticgit')
0
+ init_ticgit_branch if !(bs.include?('ticgit') && File.directory?(@tic_working))
0
       
0
       tree = git.lib.full_tree('ticgit')
0
       tree.each do |t|
0
@@ -235,7 +237,7 @@
0
     def init_ticgit_branch
0
       puts 'creating ticgit repo branch'
0
       
0
- in_branch do
0
+ in_branch(true) do
0
         new_file('.hold', 'hold')
0
         git.add
0
         git.commit('creating the ticgit branch')
0
@@ -243,7 +245,7 @@
0
     end
0
     
0
     # temporarlily switches to ticgit branch for tic work
0
- def in_branch
0
+ def in_branch(no_checkout = false)
0
       needs_checkout = false
0
       if !File.directory?(@tic_working)
0
         FileUtils.mkdir_p(@tic_working)
0
@@ -255,7 +257,7 @@
0
         git.lib.change_head_branch('ticgit')
0
         git.with_index(@tic_index) do
0
           git.with_working(@tic_working) do |wd|
0
- git.lib.checkout('ticgit') if needs_checkout_checkout
0
+ git.lib.checkout('ticgit') if needs_checkout && !no_checkout
0
             yield wd
0
           end
0
         end
...
277
278
279
280
 
281
282
283
...
277
278
279
 
280
281
282
283
0
@@ -277,7 +277,7 @@
0
               tags = tags.split(',').map { |t| t.strip }
0
             end
0
             if message.size > 0
0
- comment = message.join("\n")
0
+ comment = message.join("")
0
             end
0
             ticket_show(@tic.ticket_new(title, :comment => comment, :tags => tags))
0
           else
...
65
66
67
68
69
 
 
70
71
72
...
190
191
192
193
 
194
195
196
...
65
66
67
 
 
68
69
70
71
72
...
190
191
192
 
193
194
195
196
0
@@ -65,8 +65,8 @@
0
     
0
     
0
     def self.parse_ticket_name(name)
0
- epoch, title, rand = name.split('-')
0
- title = title.gsub('_', ' ')
0
+ epoch, title, rand = name.split('_')
0
+ title = title.gsub('-', ' ')
0
       return [title, Time.at(epoch.to_i)]
0
     end
0
     
0
@@ -190,7 +190,7 @@
0
     end
0
     
0
     def self.create_ticket_name(title)
0
- [Time.now.to_i.to_s, Ticket.clean_string(title), rand(999).to_i.to_s].join('-')
0
+ [Time.now.to_i.to_s, Ticket.clean_string(title), rand(999).to_i.to_s].join('_')
0
     end
0
 
0
     
...
 
1
2
 
3
 
 
 
 
 
 
 
 
 
 
 
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
1
2
 
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
 
22
23
24
25
26
27
 
 
 
 
 
 
 
 
0
@@ -1,26 +1,28 @@
0
+link to another ticket (child tickets)
0
 
0
-Recent (use git-log)
0
+Merge
0
 
0
+link to a git object
0
+
0
+Web UI
0
+
0
+TicGit goes up directories until it finds .git dir
0
+
0
+Ticket
0
+- remove ticket ( git.remove(ticket_dir, :recursive => true) )
0
+
0
+Color Output + Paging long results
0
+
0
 Attachments
0
   - add
0
   - download
0
 
0
 Milestones
0
 
0
-Merge
0
-
0
 Tags
0
   * show all tags
0
   * rename tag
0
   * delete tag
0
   * tag multiple tics
0
   
0
-Ticket
0
- - remove ticket ( git.remove(ticket_dir, :recursive => true) )
0
-
0
-Color Output + Paging long results
0
-
0
-TicGit goes up directories until it finds .git dir
0
-
0
-Web UI

Comments

    No one has commented yet.