{"thread":{"id":"3216","subject":"gitview 0.3","startedAt":"2006-02-02T04:33:14Z","lastAt":"2006-02-03T09:20:53Z","messageCount":7,"participants":["Aneesh Kumar","Junio C Hamano","Jonas Fonseca","Andreas Ericsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"15464","messageId":"cc723f590602012033w41b49b2ao4423707702086739@mail.gmail.com","threadId":"3216","inReplyTo":null,"subject":"gitview 0.3","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-02-02T04:33:14Z","receivedAt":"2006-02-02T04:33:14Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"Attaching below the latest code\n\nChanges from 0.1\n* use diff-tree -m to generate the diff with --with-diff option.\n* Some code cleanup\n* Added --with-diff option\n* Fixed typo (Dave Jones)\n\n-aneesh\n"},{"id":"15467","messageId":"7vzmlauw35.fsf@assigned-by-dhcp.cox.net","threadId":"3216","inReplyTo":"cc723f590602012033w41b49b2ao4423707702086739@mail.gmail.com","subject":"Re: gitview 0.3","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-02T06:13:34Z","receivedAt":"2006-02-02T06:13:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nice work for 0.low-number version.\n\nOn my notebook, I felt really miserable to see that the middle\nband taking so much space to show rev committer timestamp and\nparents.  The bottom window starts with the same information\nrepeated (worse, with unreadable timestamp format) and I had to\nscroll all the way down to view the rest of the commit message.\n\nIf you absolutely want the middle band, maybe instead of showing\nobject names in \"Parents\" \"Children\" part, you can show the\none-line commit logs from them there, and pop-up the object\nnames along with the rest of commit log message as mouse hovers\nover.\n\nI missed \"this commit is branch head of X\" and \"this commit is\ntagged with T\" markers gitk has.\n\nNeeds a bit more compact layout to be useful for me.  In short,\ngitk's display does everything I want it to show in a compact\nenough way and I think there is no reason not to imitate it.\n\nDo colors of nodes have any significance?  I couldn't tell from\nthe UI (and I tried to figure it out without reading code --\notherwise I cannot tell if the choice of colors is intuitive).\n\nIt might match more people's expectation if --with-diff were the\ndefault.\n\nThis patch might make merges easier to read.\n\n-- >8 --\n[PATCH] Use \"diff-tree -c\" to display merges a bit more readably.\n\n--- a/gitview\t2006-02-01 21:16:43.000000000 -0800\n+++ b/gitview\t2006-02-01 21:46:24.000000000 -0800\n@@ -305,7 +305,7 @@\n \t\treturn message\n \n \tdef diff_tree(self):\n-\t\tfp = os.popen(\"git diff-tree --pretty -m -v -p \" + \" \" + self.commit_sha1)\n+\t\tfp = os.popen(\"git diff-tree --pretty -c -v -p \" + \" \" + self.commit_sha1)\n \t\tdiff = fp.read()\n \t\tfp.close()\n \n"},{"id":"15470","messageId":"cc723f590602012315p2ba6e3f5rcf34df4bdefa5cb7@mail.gmail.com","threadId":"3216","inReplyTo":"7vzmlauw35.fsf@assigned-by-dhcp.cox.net","subject":"Re: gitview 0.3","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-02-02T07:15:39Z","receivedAt":"2006-02-02T07:15:39Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On 2/2/06, Junio C Hamano <junkio@cox.net> wrote:\n> Nhe choice of colors is intuitive).\n>\n> It might match more people's expectation if --with-diff were the\n> default.\n>\n\nDone. I made it to take option --without-diff for guys like me\n\n\n> This patch might make merges easier to read.\n>\n> -- >8 --\n> [PATCH] Use \"diff-tree -c\" to display merges a bit more readably.\n>\n> --- a/gitview   2006-02-01 21:16:43.000000000 -0800\n> +++ b/gitview   2006-02-01 21:46:24.000000000 -0800\n> @@ -305,7 +305,7 @@\n>                 return message\n>\n>         def diff_tree(self):\n> -               fp = os.popen(\"git diff-tree --pretty -m -v -p \" + \" \" + self.commit_sha1)\n> +               fp = os.popen(\"git diff-tree --pretty -c -v -p \" + \" \" + self.commit_sha1)\n>                 diff = fp.read()\n>                 fp.close()\n>\n>\n>\n>\n\n\nI applied this patch . But the problem now is merge commits doesn't\nshow the commit messages. Adding -m also didn't help. Any suggestion\n\n-aneesh\n"},{"id":"15487","messageId":"20060202122124.GB9756@diku.dk","threadId":"3216","inReplyTo":"cc723f590602012033w41b49b2ao4423707702086739@mail.gmail.com","subject":"[PATCH] Fix date display","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2006-02-02T12:21:24Z","receivedAt":"2006-02-02T12:21:24Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Hello,\n\nHere is a patch that uses the tz info for setting commit dates.\n\n--- a/gitview\t2006-02-02 12:29:05.000000000 +0100\n+++ b/gitview\t2006-02-02 12:28:24.000000000 +0100\n@@ -31,6 +31,7 @@\n     have_gtksourceview = False\n     print \"Running without gtksourceview module\"\n \n+re_ident = re.compile('(author|committer) (?P<ident>.*) (?P<epoch>\\d+) (?P<tz>[+-]\\d{4})')\n \n def list_to_string(args, skip):\n \tcount = len(args)\n@@ -43,6 +44,16 @@\n \n \treturn str_arg\n \n+def show_date(epoch, tz):\n+\tsecs = float(epoch)\n+\ttzsecs = float(tz[1:3]) * 3600\n+\ttzsecs += float(tz[3:5]) * 60\n+\tif (tz[0] == \"+\"):\n+\t\tsecs += tzsecs\n+\telse:\n+\t\tsecs -= tzsecs\n+\treturn time.strftime(\"%Y-%m-%d %H:%M:%S\", time.gmtime(secs))\n+\n \n class CellRendererGraph(gtk.GenericCellRenderer):\n \t\"\"\"Cell renderer for directed graph.\n@@ -277,22 +288,15 @@\n \t\t\tif (m != None):\n \t\t\t\tcontinue\n \n-\n-\t\t\tm = re.match(\"author\", line)\n-\t\t\tif (m  != None ):\n-\t\t\t\tpatch_author = re.split(\" \", line)\t\n-\t\t\t\tself.author = list_to_string(patch_author[1:-2], 0)\n-\t\t\t\tself.date = time.strftime(\"%Y-%m-%d %H:%M:%S\",\n-\t\t\t\t\t\ttime.gmtime(float(patch_author[-2])))\n-\t\t\t\tcontinue\n-\n-\t\t\tm = re.match(\"committer\", line)\n-\t\t\tif (m  != None ):\n-\t\t\t\tpatch_committer = re.split(\" \", line)\t\n-\t\t\t\tself.committer = list_to_string(patch_committer[1:-2], 0)\n-\t\t\t\tself.commit_date = time.strftime(\"%Y-%m-%d %H:%M:%S\",\n-\t\t\t\t\t\ttime.gmtime(float(patch_committer[-2])))\n-\t\t\t\tcontinue\n+\t\t\tm = re_ident.match(line)\n+\t\t\tif (m != None):\n+\t\t\t\tdate = show_date(m.group('epoch'), m.group('tz'))\n+\t\t\t\tif m.group(1)[0] == 'a':\n+\t\t\t\t\tself.author = m.group('ident')\n+\t\t\t\t\tself.date = date\n+\t\t\t\telse:\n+\t\t\t\t\tself.committer = m.group('ident')\n+\t\t\t\t\tself.commit_date = date\n \n \tdef get_message(self, with_diff=0):\n \t\tif (with_diff == 1):\n-- \nJonas Fonseca\n"},{"id":"15490","messageId":"cc723f590602020803u72bdff2ek95fba2ea30970170@mail.gmail.com","threadId":"3216","inReplyTo":"7vzmlauw35.fsf@assigned-by-dhcp.cox.net","subject":"Re: gitview 0.3","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-02-02T16:03:53Z","receivedAt":"2006-02-02T16:03:53Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On 2/2/06, Junio C Hamano <junkio@cox.net> wrote:\n> Nice work for 0.low-number version.\n>\n> On my notebook, I felt really miserable to see that the middle\n> band taking so much space to show rev committer timestamp and\n> parents.  The bottom window starts with the same information\n> repeated (worse, with unreadable timestamp format) and I had to\n> scroll all the way down to view the rest of the commit message.\n\nI have rearranged the default with respect these frames. Attaching the\ncode below. Let me know if it is ok.\n\n\n>\n> If you absolutely want the middle band, maybe instead of showing\n> object names in \"Parents\" \"Children\" part, you can show the\n> one-line commit logs from them there, and pop-up the object\n> names along with the rest of commit log message as mouse hovers\n> over.\n>\n> I missed \"this commit is branch head of X\" and \"this commit is\n> tagged with T\" markers gitk has.\n>\n\nI am planning to add this. I am yet to learn fully how to use the\ncairo API. gitview was partly my attempt to learn pygtk.\n\n\n> Needs a bit more compact layout to be useful for me.  In short,\n> gitk's display does everything I want it to show in a compact\n> enough way and I think there is no reason not to imitate it.\n>\n\nOne thing i didn't like with gitk was the looks. And the diff window\nwas so shaded i had to put real effort to read the contents. May be i\ndidn't had necessary fonts. I don't know\n\n\n> Do colors of nodes have any significance?  I couldn't tell from\n> the UI (and I tried to figure it out without reading code --\n> otherwise I cannot tell if the choice of colors is intuitive).\n>\n\nOne parent of the child follows the same colour. It in a way let one\nfigure out at what point branch happened and at what point they merged\nback.\n\n\n> It might match more people's expectation if --with-diff were the\n> default.\n>\n\nThis is done. I am attaching the full code below. Can you get the\ngitview added git repository so that next time onwards i need to send\nonly the diff.\n\n> This patch might make merges easier to read.\n>\n> -- >8 --\n> [PATCH] Use \"diff-tree -c\" to display merges a bit more readably.\n>\n> --- a/gitview   2006-02-01 21:16:43.000000000 -0800\n> +++ b/gitview   2006-02-01 21:46:24.000000000 -0800\n> @@ -305,7 +305,7 @@\n>                 return message\n>\n>         def diff_tree(self):\n> -               fp = os.popen(\"git diff-tree --pretty -m -v -p \" + \" \" + self.commit_sha1)\n> +               fp = os.popen(\"git diff-tree --pretty -c -v -p \" + \" \" + self.commit_sha1)\n>                 diff = fp.read()\n>                 fp.close()\n>\n>\n>\n>\n\n\nI am using the --cc flag and if i don't have any message i get the\ncommit message only using git cat-file. I guess that is ok\n\n-aneesh\n"},{"id":"15506","messageId":"7vzml9kp9q.fsf@assigned-by-dhcp.cox.net","threadId":"3216","inReplyTo":"cc723f590602020803u72bdff2ek95fba2ea30970170@mail.gmail.com","subject":"Re: gitview 0.3","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-03T05:03:13Z","receivedAt":"2006-02-03T05:03:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Aneesh Kumar <aneesh.kumar@gmail.com> writes:\n\n> ... Can you get the gitview added git repository so that next\n> time onwards i need to send only the diff.\n\nWe _could_ make a contrib/gitview directory to keep it there,\nand as somebody else comes up with a new interesting git\napplication, add a new directory in contrib/ to expand that\narea.\n\nBut personally I am not enthused about keeping other peoples'\nprojects in git.git tree [*1*].  I'd rather see you start your\nown public repository, propagate your changes from there, and\nrun it as your own project.\n\nEven though it is currently a single file 'project', you will\nwant to add more stuff, maybe splitting the code to use your own\n*.py module to import into the main program, and add *.c files\nto interface with the lower level and Makefile to describe the\nbuild rules once we start libifying git.  I suspect we are all\nbetter off if we keep separate projects separate in the long\nrun.\n\nSomebody (I think it was Sean Estabrooks but I may be mistaken)\nonce offered to host git projects at a site he controls.  I\nwonder if you can get him interested...\n\n\n[Footnote]\n\n*1* I was not too happy to see gitk merged in with \"the coolest\nmerge ever\" myself, but that was done before my time.  \"Not too\nhappy\" does not necessarily mean I object to it.  All things\nconsidered I think it was a good thing: (1) as a showcase of how\ncool a merge can be, it was a good demonstration; (2) coming\nwith a repository browser usable out-of-box with minimum\ndependencies was a good thing (tcl/tk is pretty much available\nuniversally for easy install); (3) it is a good example program\nof how a repository browser can be done.\n"},{"id":"15517","messageId":"43E32075.9010507@op5.se","threadId":"3216","inReplyTo":"7vzml9kp9q.fsf@assigned-by-dhcp.cox.net","subject":"Re: gitview 0.3","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-02-03T09:20:53Z","receivedAt":"2006-02-03T09:20:53Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> \n> Somebody (I think it was Sean Estabrooks but I may be mistaken)\n> once offered to host git projects at a site he controls.  I\n> wonder if you can get him interested...\n> \n\nI've got space for this. If anyone's interested, send me an email off-list.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"}]}