{"thread":{"id":"6782","subject":"git-gui blametool","startedAt":"2007-02-12T14:32:22Z","lastAt":"2007-02-12T19:20:04Z","messageCount":7,"participants":["Aneesh Kumar K.V","Shawn O. Pearce","Aneesh Kumar","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"34288","messageId":"45D07A76.1070009@gmail.com","threadId":"6782","inReplyTo":null,"subject":"git-gui blametool","fromName":"Aneesh Kumar K.V","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2007-02-12T14:32:22Z","receivedAt":"2007-02-12T14:32:22Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"Hi All,\n\nI found the git-gui blame tool interface quiet confusing with the all \nthose color code. What does the color code actually mean ? A simple \ninterface would be\n\n[ commit ] [ line number ] [ code ]\n\n....\n...\n--------------------------------------\ncommit details of the selected commit\n\n\n-aneesh\n"},{"id":"34292","messageId":"45D095B1.9070308@gmail.com","threadId":"6782","inReplyTo":"45D07A76.1070009@gmail.com","subject":"Re: git-gui blametool","fromName":"Aneesh Kumar K.V","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2007-02-12T16:28:33Z","receivedAt":"2007-02-12T16:28:33Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"Aneesh Kumar K.V wrote:\n> Hi All,\n> \n> I found the git-gui blame tool interface quiet confusing with the all \n> those color code. What does the color code actually mean ? A simple \n> interface would be\n> \n> [ commit ] [ line number ] [ code ]\n> \n> ....\n> ...\n> --------------------------------------\n> commit details of the selected commit\n> \n> \n\nSine i don't have a tcl/tk reference around i update blameview to show \nthe above. The patch is attached below in case you are interested.\n\nNOTE: How do i resize the widgets in perl-gtk ? I wanted the commit \nwindow to be a bit larger. Any help ?\n\n-aneesh\n\n\n\ndiff --git a/contrib/blameview/blameview.perl b/contrib/blameview/blameview.perl\nindex 807d01f..67a0714 100755\n--- a/contrib/blameview/blameview.perl\n+++ b/contrib/blameview/blameview.perl\n@@ -25,11 +25,13 @@ EOS\n \n my $window = Gtk2::Window->new('toplevel');\n $window->signal_connect(destroy => sub { Gtk2->main_quit });\n+my $vbox = Gtk2::VBox->new();\n+$vbox->set_homogeneous(0);\n+$window->add($vbox);\n my $scrolled_window = Gtk2::ScrolledWindow->new;\n-$window->add($scrolled_window);\n+$vbox->pack_start($scrolled_window, 1, 1, 0);\n my $fileview = Gtk2::SimpleList->new(\n     'Commit' => 'text',\n-    'CommitInfo' => 'text',\n     'FileLine' => 'text',\n     'Data' => 'text'\n );\n@@ -41,7 +43,26 @@ $fileview->signal_connect (row_activated => sub {\n \t\tmy ($sl, $path, $column) = @_;\n \t\tmy $row_ref = $sl->get_row_data_from_path ($path);\n \t\tsystem(\"blameview @$row_ref[0] $fn\");\n-\t\t# $row_ref is now an array ref to the double-clicked row's data.\n+\t\t});\n+\n+my $commitwindow = Gtk2::ScrolledWindow->new();\n+$commitwindow->set_policy ('GTK_POLICY_AUTOMATIC','GTK_POLICY_AUTOMATIC');\n+$vbox->pack_start($commitwindow, 1, 1, 0);\n+my $commit_text = Gtk2::TextView->new();\n+my $commit_buffer = Gtk2::TextBuffer->new();\n+$commit_text->set_buffer($commit_buffer);\n+$commitwindow->add($commit_text);\n+\n+$fileview->signal_connect (cursor_changed => sub {\n+\t\tmy ($sl) = @_;\n+\t\tmy ($path, $focus_column) = $sl->get_cursor();\n+\t\tmy $row_ref = $sl->get_row_data_from_path ($path);\n+\t\tmy $c_fh;\n+\t\topen($c_fh,  '-|', \"git cat-file commit @$row_ref[0]\")\n+\t\t\t\t\tor die \"unable to find commit @$row_ref[0]\";\n+\t\tmy @buffer = <$c_fh>;\n+\t\t$commit_buffer->set_text(\"@buffer\");\n+\t\tclose($c_fh);\n \t\t});\n \n my $fh;\n@@ -50,7 +71,7 @@ open($fh, '-|', \"git cat-file blob $hash:$fn\")\n \n while(<$fh>) {\n   chomp;\n-  $fileview->{data}->[$.] = ['HEAD', '?', \"$fn:$.\", $_];\n+  $fileview->{data}->[$.] = ['HEAD', \"$fn:$.\", $_];\n }\n \n my $blame;\n@@ -79,8 +100,7 @@ sub flush_blame_line {\n \n \tfor(my $i = 0; $i < $cnt; $i++) {\n \t\t@{$fileview->{data}->[$lno+$i-1]}[0,1,2] =\n-\t\t    (substr($commit, 0, 8), $info,\n-\t\t     $filename . ':' . ($s_lno+$i));\n+\t\t(substr($commit, 0, 8), $filename . ':' . ($s_lno+$i));\n \t}\n }\n \n"},{"id":"34293","messageId":"45D096C0.9070002@gmail.com","threadId":"6782","inReplyTo":"45D07A76.1070009@gmail.com","subject":"Re: git-gui blametool","fromName":"Aneesh Kumar K.V","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2007-02-12T16:33:04Z","receivedAt":"2007-02-12T16:33:04Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"Aneesh Kumar K.V wrote:\n> Hi All,\n> \n> I found the git-gui blame tool interface quiet confusing with the all \n> those color code. What does the color code actually mean ? A simple \n> interface would be\n> \n> [ commit ] [ line number ] [ code ]\n> \n> ....\n> ...\n> --------------------------------------\n> commit details of the selected commit\n> \n> \n\nSine i don't have a tcl/tk reference around i update blameview to show \nthe above. The patch is attached below in case you are interested.\n\nNOTE: How do i resize the widgets in perl-gtk ? I wanted the commit \nwindow to be a bit larger. Any help ?\n\n-aneesh\n\n\n\ndiff --git a/contrib/blameview/blameview.perl b/contrib/blameview/blameview.perl\nindex 807d01f..67a0714 100755\n--- a/contrib/blameview/blameview.perl\n+++ b/contrib/blameview/blameview.perl\n@@ -25,11 +25,13 @@ EOS\n \n my $window = Gtk2::Window->new('toplevel');\n $window->signal_connect(destroy => sub { Gtk2->main_quit });\n+my $vbox = Gtk2::VBox->new();\n+$vbox->set_homogeneous(0);\n+$window->add($vbox);\n my $scrolled_window = Gtk2::ScrolledWindow->new;\n-$window->add($scrolled_window);\n+$vbox->pack_start($scrolled_window, 1, 1, 0);\n my $fileview = Gtk2::SimpleList->new(\n     'Commit' => 'text',\n-    'CommitInfo' => 'text',\n     'FileLine' => 'text',\n     'Data' => 'text'\n );\n@@ -41,7 +43,26 @@ $fileview->signal_connect (row_activated => sub {\n \t\tmy ($sl, $path, $column) = @_;\n \t\tmy $row_ref = $sl->get_row_data_from_path ($path);\n \t\tsystem(\"blameview @$row_ref[0] $fn\");\n-\t\t# $row_ref is now an array ref to the double-clicked row's data.\n+\t\t});\n+\n+my $commitwindow = Gtk2::ScrolledWindow->new();\n+$commitwindow->set_policy ('GTK_POLICY_AUTOMATIC','GTK_POLICY_AUTOMATIC');\n+$vbox->pack_start($commitwindow, 1, 1, 0);\n+my $commit_text = Gtk2::TextView->new();\n+my $commit_buffer = Gtk2::TextBuffer->new();\n+$commit_text->set_buffer($commit_buffer);\n+$commitwindow->add($commit_text);\n+\n+$fileview->signal_connect (cursor_changed => sub {\n+\t\tmy ($sl) = @_;\n+\t\tmy ($path, $focus_column) = $sl->get_cursor();\n+\t\tmy $row_ref = $sl->get_row_data_from_path ($path);\n+\t\tmy $c_fh;\n+\t\topen($c_fh,  '-|', \"git cat-file commit @$row_ref[0]\")\n+\t\t\t\t\tor die \"unable to find commit @$row_ref[0]\";\n+\t\tmy @buffer = <$c_fh>;\n+\t\t$commit_buffer->set_text(\"@buffer\");\n+\t\tclose($c_fh);\n \t\t});\n \n my $fh;\n@@ -50,7 +71,7 @@ open($fh, '-|', \"git cat-file blob $hash:$fn\")\n \n while(<$fh>) {\n   chomp;\n-  $fileview->{data}->[$.] = ['HEAD', '?', \"$fn:$.\", $_];\n+  $fileview->{data}->[$.] = ['HEAD', \"$fn:$.\", $_];\n }\n \n my $blame;\n@@ -79,8 +100,7 @@ sub flush_blame_line {\n \n \tfor(my $i = 0; $i < $cnt; $i++) {\n \t\t@{$fileview->{data}->[$lno+$i-1]}[0,1,2] =\n-\t\t    (substr($commit, 0, 8), $info,\n-\t\t     $filename . ':' . ($s_lno+$i));\n+\t\t(substr($commit, 0, 8), $filename . ':' . ($s_lno+$i));\n \t}\n }\n \n"},{"id":"34301","messageId":"20070212173218.GD29621@spearce.org","threadId":"6782","inReplyTo":"45D07A76.1070009@gmail.com","subject":"Re: git-gui blametool","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-02-12T17:32:18Z","receivedAt":"2007-02-12T17:32:18Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Aneesh Kumar K.V\" <aneesh.kumar@gmail.com> wrote:\n> I found the git-gui blame tool interface quiet confusing with the all \n> those color code. What does the color code actually mean ?\n\nCan you try the version of git-gui that Junio pushed out to `master`\nlast night?\n\n> A simple \n> interface would be\n> \n> [ commit ] [ line number ] [ code ]\n> \n> ....\n> ...\n> --------------------------------------\n> commit details of the selected commit\n\nBecause it uses this interface.  Almost.  It doesn't show the\n[commit] column.\n\n-- \nShawn.\n"},{"id":"34302","messageId":"cc723f590702120936y64044ac4r86698b5d7e540bd8@mail.gmail.com","threadId":"6782","inReplyTo":"20070212173218.GD29621@spearce.org","subject":"Re: git-gui blametool","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2007-02-12T17:36:02Z","receivedAt":"2007-02-12T17:36:02Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On 2/12/07, Shawn O. Pearce <spearce@spearce.org> wrote:\n> \"Aneesh Kumar K.V\" <aneesh.kumar@gmail.com> wrote:\n> > I found the git-gui blame tool interface quiet confusing with the all\n> > those color code. What does the color code actually mean ?\n>\n> Can you try the version of git-gui that Junio pushed out to `master`\n> last night?\n>\n> > A simple\n> > interface would be\n> >\n> > [ commit ] [ line number ] [ code ]\n> >\n> > ....\n> > ...\n> > --------------------------------------\n> > commit details of the selected commit\n>\n> Because it uses this interface.  Almost.  It doesn't show the\n> [commit] column.\n>\n\nI tried the same one. I was requesting to add the commit column. Right\nnow the interface is pretty confusing. After some reading of the code\ni figured out that colours have a specific meaning. May be we need to\nadd a manual to the same.\n\nbut any how having commit in a column like this is really nice. I just\nsent a new patch for blameview. That should give an idea how much the\ninterface looks better.\n\n-aneesh\n"},{"id":"34303","messageId":"20070212175400.GB30669@coredump.intra.peff.net","threadId":"6782","inReplyTo":"45D095B1.9070308@gmail.com","subject":"Re: git-gui blametool","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-02-12T17:54:00Z","receivedAt":"2007-02-12T17:54:00Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Feb 12, 2007 at 09:58:33PM +0530, Aneesh Kumar K.V wrote:\n\n> Sine i don't have a tcl/tk reference around i update blameview to show \n> the above. The patch is attached below in case you are interested.\n\nIt certainly looks better, though the whole thing is still horribly\nugly. You might play with replacing the main List widget with something\na bit more compact.\n\n> NOTE: How do i resize the widgets in perl-gtk ? I wanted the commit \n> window to be a bit larger. Any help ?\n\nSomething like this?\n\n-Peff\n\ndiff --git a/contrib/blameview/blameview.perl b/contrib/blameview/blameview.perl\nindex 67a0714..fd174eb 100755\n--- a/contrib/blameview/blameview.perl\n+++ b/contrib/blameview/blameview.perl\n@@ -51,6 +51,7 @@ $vbox->pack_start($commitwindow, 1, 1, 0);\n my $commit_text = Gtk2::TextView->new();\n my $commit_buffer = Gtk2::TextBuffer->new();\n $commit_text->set_buffer($commit_buffer);\n+$commit_text->set_size_request(1024, 200);\n $commitwindow->add($commit_text);\n \n $fileview->signal_connect (cursor_changed => sub {\n"},{"id":"34306","messageId":"20070212192004.GB30249@spearce.org","threadId":"6782","inReplyTo":"cc723f590702120936y64044ac4r86698b5d7e540bd8@mail.gmail.com","subject":"Re: git-gui blametool","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-02-12T19:20:04Z","receivedAt":"2007-02-12T19:20:04Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Aneesh Kumar <aneesh.kumar@gmail.com> wrote:\n> I tried the same one. I was requesting to add the commit column. Right\n> now the interface is pretty confusing. After some reading of the code\n> i figured out that colours have a specific meaning. May be we need to\n> add a manual to the same.\n> \n> but any how having commit in a column like this is really nice. I just\n> sent a new patch for blameview. That should give an idea how much the\n> interface looks better.\n\nAhhh.  I was thinking of adding it myself anyway.  Now that two\npeople think showing a commit column might be a good idea, I'll\nadd it in.\n\n-- \nShawn.\n"}]}