[gitg/wip/sindhus/interactive-rebase: 2/2] Parsing git-rebase-todo



commit 7ed36758b733e609a6a243662b81d17531182f57
Author: Sindhu S <sindhus live in>
Date:   Mon Sep 9 17:13:31 2013 +0530

    Parsing git-rebase-todo

 gitg/Makefile.am             |    1 +
 gitg/gitg-application.vala   |    5 +++--
 gitg/gitg-rebase-parser.vala |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/gitg/Makefile.am b/gitg/Makefile.am
index 52972fc..3f9866e 100644
--- a/gitg/Makefile.am
+++ b/gitg/Makefile.am
@@ -42,6 +42,7 @@ VALASOURCES =                                                 \
        gitg-clone-dialog.vala                                  \
        gitg-author-details-dialog.vala                                 \
        gitg-resource.vala                                      \
+       gitg-rebase-parser.vala                                 \
        gitg-rebase-window.vala                                 \
        gitg-application.vala                                   \
        gitg-plugins-engine.vala                                \
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index aa08a9e..143174d 100644
--- a/gitg/gitg-application.vala
+++ b/gitg/gitg-application.vala
@@ -165,8 +165,9 @@ public class Application : Gtk.Application
                if (Options.rebase != "")
                {
                        stderr.printf("Starting rebase: %s", Options.rebase);
-                       var rebase_window = new RebaseWindow();
-                       rebase_window.start();
+                       var parser = new RebaseParser();
+                       parser.parse_rebase_todo("/home/sindhus/git-rebase-todo");
+//                     var rebase_window = new RebaseWindow();
                        return 0;
                }
 
diff --git a/gitg/gitg-rebase-parser.vala b/gitg/gitg-rebase-parser.vala
new file mode 100644
index 0000000..f85283d
--- /dev/null
+++ b/gitg/gitg-rebase-parser.vala
@@ -0,0 +1,35 @@
+/*
+ * This file is part of gitg
+ *
+ * Copyright (C) 2013 - Sindhu S
+ *
+ * gitg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gitg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gitg. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace Gitg
+{
+       public class RebaseParser
+       {
+               public RebaseParser()
+               {
+               }
+
+               public void parse_rebase_todo(string filename)
+               {
+                       string contents;
+                       FileUtils.get_contents(filename, out contents);
+                       stdout.printf("Contents: %s", contents);
+               }
+       }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]