[gitg/wip/sindhus/interactive-rebase] BOOM REBASE!
- From: Sindhu Sundar <sindhus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/sindhus/interactive-rebase] BOOM REBASE!
- Date: Tue, 10 Sep 2013 21:05:04 +0000 (UTC)
commit 646059636dcacc4a03286cd4d26d4752c4846998
Author: Sindhu S <sindhus live in>
Date: Tue Sep 10 21:08:58 2013 +0530
BOOM REBASE!
gitg/gitg-application.vala | 2 +-
gitg/gitg-rebase-window.vala | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index 5f666d5..1371317 100644
--- a/gitg/gitg-application.vala
+++ b/gitg/gitg-application.vala
@@ -166,7 +166,7 @@ public class Application : Gtk.Application
{
stderr.printf("Starting rebase: %s", Options.rebase);
var rebase_window = new RebaseWindow();
- rebase_window.load_rebase_todo("/home/sindhus/git-rebase-todo");
+ rebase_window.load_rebase_todo(Options.rebase);
rebase_window.show_all();
Gtk.main();
return 0;
diff --git a/gitg/gitg-rebase-window.vala b/gitg/gitg-rebase-window.vala
index 852102e..2d5dee5 100644
--- a/gitg/gitg-rebase-window.vala
+++ b/gitg/gitg-rebase-window.vala
@@ -23,6 +23,8 @@ namespace Gitg
public class RebaseWindow : Gtk.Window
{
private RebaseListBox r_rebase_list_box;
+ private string r_filepath;
+
public RebaseWindow()
{
this.title = "gitg Rebase";
@@ -40,8 +42,9 @@ public class RebaseWindow : Gtk.Window
public void load_rebase_todo(string filepath)
{
+ r_filepath = filepath;
var parser = new RebaseParser();
- var rebase_array = parser.parse_rebase_todo(filepath);
+ var rebase_array = parser.parse_rebase_todo(r_filepath);
foreach (var rebase_row in rebase_array)
{
r_rebase_list_box.add_rebase_row(rebase_row[0], rebase_row[1], rebase_row[2]);
@@ -55,6 +58,8 @@ public class RebaseWindow : Gtk.Window
string rebase_output = "";
rebase_output = parser.generate_rebase_todo(rebase_array);
stdout.printf("\nrebase_output: \n%s", rebase_output);
+ FileUtils.set_contents(r_filepath, rebase_output);
+ destroy();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]