tekkub-fugit 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -0
- data/VERSION.yml +1 -1
- data/lib/fugit/commit_tab.rb +0 -2
- data/lib/fugit/create_branch_dialog.rb +22 -6
- data/lib/fugit/fetch_dialog.rb +0 -1
- data/lib/fugit/history_list.rb +1 -0
- data/lib/fugit/main_frame.rb +2 -0
- data/lib/fugit/push_dialog.rb +0 -1
- data/lib/fugit/tab_toolbar.rb +1 -0
- metadata +22 -2
data/Rakefile
CHANGED
@@ -11,6 +11,8 @@ begin
|
|
11
11
|
s.authors = ["Tekkub"]
|
12
12
|
s.bindir = 'bin'
|
13
13
|
s.add_dependency('wxruby', [">= 1.9.9"])
|
14
|
+
s.add_dependency('mime-types', [">= 1.15"])
|
15
|
+
s.add_dependency('diff-lcs', [">= 1.1.2"])
|
14
16
|
end
|
15
17
|
rescue LoadError
|
16
18
|
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
data/VERSION.yml
CHANGED
data/lib/fugit/commit_tab.rb
CHANGED
@@ -3,14 +3,18 @@ include Wx
|
|
3
3
|
module Fugit
|
4
4
|
class CreateBranchDialog < Dialog
|
5
5
|
def initialize(parent)
|
6
|
-
super(parent, ID_ANY, "Create branch", :size => Size.new(300,
|
6
|
+
super(parent, ID_ANY, "Create branch", :size => Size.new(300, 185))
|
7
7
|
|
8
8
|
@name = TextCtrl.new(self, ID_ANY)
|
9
9
|
@refs = ComboBox.new(self, ID_ANY)
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
@force_check = CheckBox.new(self, ID_ANY)
|
12
|
+
@force_check.set_label("&Force")
|
13
|
+
@force_check.set_tool_tip("Force the creation of a new branch even if it means deleting\na branch that already exists with the same name.")
|
14
|
+
|
15
|
+
@checkout_check = CheckBox.new(self, ID_ANY)
|
16
|
+
@checkout_check.set_label("&Checkout")
|
17
|
+
@checkout_check.set_tool_tip("Checkout branch after creation.")
|
14
18
|
|
15
19
|
butt_sizer = create_button_sizer(OK|CANCEL)
|
16
20
|
butt_sizer.get_children.map {|s| s.get_window}.compact.each {|b| b.set_label("Create") if b.get_label == "OK"}
|
@@ -22,6 +26,7 @@ module Fugit
|
|
22
26
|
box.add(StaticText.new(self, ID_ANY, "Create at:"), 0, EXPAND|LEFT|RIGHT|BOTTOM, 4)
|
23
27
|
box.add(@refs, 0, EXPAND|LEFT|RIGHT|BOTTOM, 4)
|
24
28
|
box.add(@force_check, 1, EXPAND|LEFT|RIGHT|BOTTOM, 4)
|
29
|
+
box.add(@checkout_check, 1, EXPAND|LEFT|RIGHT|BOTTOM, 4)
|
25
30
|
box.add(butt_sizer, 0, EXPAND|BOTTOM, 4)
|
26
31
|
|
27
32
|
self.set_sizer(box)
|
@@ -54,8 +59,19 @@ module Fugit
|
|
54
59
|
err = `git branch #{force}#{name} #{ref} 2>&1`
|
55
60
|
|
56
61
|
if err.empty?
|
57
|
-
|
58
|
-
|
62
|
+
if @checkout_check.is_checked
|
63
|
+
success, err = repo.checkout(name)
|
64
|
+
if success
|
65
|
+
send_message(:branch_checkout)
|
66
|
+
end_modal(ID_OK)
|
67
|
+
else
|
68
|
+
MessageDialog.new(self, err, "Branch checkout error", OK|ICON_ERROR).show_modal
|
69
|
+
@branch.set_string_selection(repo.head.name)
|
70
|
+
end
|
71
|
+
else
|
72
|
+
send_message(:branch_created)
|
73
|
+
end_modal(ID_OK)
|
74
|
+
end
|
59
75
|
else
|
60
76
|
MessageDialog.new(self, err, "Error creating branch", OK|ICON_ERROR).show_modal
|
61
77
|
end
|
data/lib/fugit/fetch_dialog.rb
CHANGED
@@ -12,7 +12,6 @@ module Fugit
|
|
12
12
|
@prune_check.set_label("&Prune deleted branches")
|
13
13
|
|
14
14
|
butt_sizer = create_button_sizer(OK|CANCEL)
|
15
|
-
butt_sizer.get_children.map {|s| s.get_window}.compact.each {|b| b.set_label(b.get_label == "OK" ? "Fetch" : "Close")}
|
16
15
|
evt_button(get_affirmative_id, :on_ok)
|
17
16
|
|
18
17
|
box = BoxSizer.new(VERTICAL)
|
data/lib/fugit/history_list.rb
CHANGED
@@ -49,6 +49,7 @@ module Fugit
|
|
49
49
|
register_for_message(:history_tab_shown, :update_list)
|
50
50
|
register_for_message(:tab_switch, :update_list)
|
51
51
|
register_for_message(:branch_created, :update_list)
|
52
|
+
register_for_message(:branch_checkout, :update_list)
|
52
53
|
register_for_message(:branch_deleted, :update_list)
|
53
54
|
register_for_message(:refresh, :update_list)
|
54
55
|
register_for_message(:exiting) {self.hide} # Things seem to run smoother if we hide before destruction
|
data/lib/fugit/main_frame.rb
CHANGED
data/lib/fugit/push_dialog.rb
CHANGED
@@ -13,7 +13,6 @@ module Fugit
|
|
13
13
|
@remote = ComboBox.new(self, ID_ANY)
|
14
14
|
|
15
15
|
butt_sizer = create_button_sizer(OK|CANCEL)
|
16
|
-
butt_sizer.get_children.map {|s| s.get_window}.compact.each {|b| b.set_label(b.get_label == "OK" ? "Push" : "Close")}
|
17
16
|
evt_button(get_affirmative_id, :on_ok)
|
18
17
|
|
19
18
|
box = BoxSizer.new(VERTICAL)
|
data/lib/fugit/tab_toolbar.rb
CHANGED
@@ -59,6 +59,7 @@ module Fugit
|
|
59
59
|
|
60
60
|
register_for_message(:tab_switch, :update_tools)
|
61
61
|
register_for_message(:branch_created, :update_tools)
|
62
|
+
register_for_message(:branch_checkout, :update_tools)
|
62
63
|
register_for_message(:branch_deleted, :update_tools)
|
63
64
|
register_for_message(:refresh, :update_tools)
|
64
65
|
register_for_message(:save_clicked, :on_commit_clicked)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tekkub-fugit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tekkub
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-06 00:00:00 -07:00
|
13
13
|
default_executable: fugit
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,6 +22,26 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 1.9.9
|
24
24
|
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: mime-types
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "1.15"
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: diff-lcs
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.1.2
|
44
|
+
version:
|
25
45
|
description: A cross-platform replacement for git-gui based on wxruby
|
26
46
|
email: tekkub@gmail.com
|
27
47
|
executables:
|