{"thread":{"id":"15622","subject":"Re: [TopGit PATCH] prev/next/tsort: commands to explore dependencies","startedAt":"2008-09-19T09:55:00Z","lastAt":"2008-09-24T15:23:18Z","messageCount":9,"participants":["Petr Baudis","Bert Wesarg","Uwe Kleine-König"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"299062","messageId":"1221818101-14333-1-git-send-email-bert.wesarg@googlemail.com","threadId":"15622","inReplyTo":null,"subject":"[TopGit PATCH] prev/next/tsort: commands to explore dependencies","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2008-09-19T09:55:00Z","receivedAt":"2008-09-19T09:55:00Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"I hacked 3 commands to explore the dependencies of TopGit patches:\n\n  I) tg prev [NAME]\n     outputs the dependencies of NAME\n\n II) tg next [NAME]\n     outputs patches that depends on NAME\n\nIII) tg tsort [PATTERN]\n     outputs a topological order of all patches starting with PATTERN\n\nI'm more than open for improvments.\n\nRegards\nBert\n   \nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n\n---\n .gitignore  |    6 ++++++\n tg-next.sh  |   33 +++++++++++++++++++++++++++++++++\n tg-prev.sh  |   27 +++++++++++++++++++++++++++\n tg-tsort.sh |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 4 files changed, 123 insertions(+), 0 deletions(-)\n\ndiff --git a/.gitignore b/.gitignore\nindex 8868f2d..b7fb70b 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -18,3 +18,9 @@ tg-import.txt\n tg-remote\n tg-remote.txt\n tg\n+tg-next\n+tg-next.txt\n+tg-prev\n+tg-prev.txt\n+tg-tsort\n+tg-tsort.txt\ndiff --git a/tg-next.sh b/tg-next.sh\nnew file mode 100644\nindex 0000000..8e17226\n--- /dev/null\n+++ b/tg-next.sh\n@@ -0,0 +1,33 @@\n+#!/bin/sh\n+# TopGit - A different patch queue manager\n+# (c) Petr Baudis <pasky@suse.cz>  2008\n+# GPLv2\n+\n+name=\n+\n+\n+## Parse options\n+\n+while [ -n \"$1\" ]; do\n+\targ=\"$1\"; shift\n+\tcase \"$arg\" in\n+\t-*)\n+\t\techo \"Usage: tg next [NAME]\" >&2\n+\t\texit 1;;\n+\t*)\n+\t\t[ -z \"$name\" ] || die \"name already specified ($name)\"\n+\t\tname=\"$arg\";;\n+\tesac\n+done\n+\n+[ -n \"$name\" ] || name=\"$(git symbolic-ref HEAD | sed 's#^refs/heads/##')\"\n+base_rev=\"$(git rev-parse --short --verify \"refs/top-bases/$name\" 2>/dev/null)\" ||\n+\tdie \"not a TopGit-controlled branch\"\n+\n+git for-each-ref --format='%(refname)' refs/top-bases |\n+\twhile read topic; do\n+\t\ttopic=\"${topic#refs/top-bases/}\"\n+\t\tif git show \"${topic}\":.topdeps 2>/dev/null | grep -q \"^${name}\\$\"; then\n+\t\t\techo \"${topic}\"\n+\t\tfi\n+\tdone\ndiff --git a/tg-prev.sh b/tg-prev.sh\nnew file mode 100644\nindex 0000000..801fb3e\n--- /dev/null\n+++ b/tg-prev.sh\n@@ -0,0 +1,27 @@\n+#!/bin/sh\n+# TopGit - A different patch queue manager\n+# (c) Petr Baudis <pasky@suse.cz>  2008\n+# GPLv2\n+\n+name=\n+\n+\n+## Parse options\n+\n+while [ -n \"$1\" ]; do\n+\targ=\"$1\"; shift\n+\tcase \"$arg\" in\n+\t-*)\n+\t\techo \"Usage: tg next [NAME]\" >&2\n+\t\texit 1;;\n+\t*)\n+\t\t[ -z \"$name\" ] || die \"name already specified ($name)\"\n+\t\tname=\"$arg\";;\n+\tesac\n+done\n+\n+[ -n \"$name\" ] || name=\"$(git symbolic-ref HEAD | sed 's#^refs/heads/##')\"\n+base_rev=\"$(git rev-parse --short --verify \"refs/top-bases/$name\" 2>/dev/null)\" ||\n+\tdie \"not a TopGit-controlled branch\"\n+\n+git show \"$name:.topdeps\"\ndiff --git a/tg-tsort.sh b/tg-tsort.sh\nnew file mode 100644\nindex 0000000..8a7376a\n--- /dev/null\n+++ b/tg-tsort.sh\n@@ -0,0 +1,57 @@\n+#!/bin/sh\n+# TopGit - A different patch queue manager\n+# (c) Petr Baudis <pasky@suse.cz>  2008\n+# GPLv2\n+\n+pattern=\n+\n+## Parse options\n+\n+while [ -n \"$1\" ]; do\n+\targ=\"$1\"; shift\n+\tcase \"$arg\" in\n+\t-*)\n+\t\techo \"Usage: tg tsort [PATTERN]\" >&2\n+\t\texit 1;;\n+\t*)\n+\t\t[ -z \"$pattern\" ] || die \"pattern already specified ($pattern)\"\n+\t\tpattern=\"$arg\";;\n+\tesac\n+done\n+\n+# remove trailing /, they wont work with for-each-ref\n+pattern=\"$(echo \"refs/top-bases/$pattern\" | sed -re 's#/+$##g')\"\n+\n+name=\"$(git symbolic-ref HEAD | sed 's#^refs/heads/##')\"\n+base_rev=\"$(git rev-parse --short --verify \"refs/top-bases/$name\" 2>/dev/null)\" ||\n+\tdie \"not a TopGit-controlled branch\"\n+\n+rev_map=\"$(mktemp)\"\n+rev_map_uniq=\"$(mktemp)\"\n+rev_map_sed=\"$(mktemp)\"\n+tsort_out=\"$(mktemp)\"\n+trap 'rm -f \"$rev_map\" \"$rev_map_uniq\" \"$rev_map_sed\" \"$tsort_out\"' EXIT\n+\n+(\n+\texec 3>\"$rev_map\"\n+\tcd \"$git_dir\"\n+\tgit for-each-ref --format='%(refname)' $pattern |\n+\t\twhile read topic; do\n+\t\t\ttopic=\"${topic#refs/top-bases/}\"\n+\t\t\ttopic_rev=\"$(git rev-parse --verify \"${topic}\" 2>/dev/null)\"\n+\t\t\tprintf \"%s\\t%q\\n\" \"${topic_rev}\" \"${topic}\" >&3\n+\t\t\tgit show \"${topic}\":.topdeps 2>/dev/null |\n+\t\t\t\twhile read dep; do\n+\t\t\t\t\tdep_rev=\"$(git rev-parse --verify \"${dep}\" 2>/dev/null)\"\n+\t\t\t\t\tprintf \"%s\\t%q\\n\" \"${dep_rev}\" \"${dep}\" >&3\n+\t\t\t\t\tprintf \"%s\\t%s\\n\" \"${topic_rev}\" \"${dep_rev}\"\n+\t\t\t\tdone\n+\t\tdone\n+) | tsort | tac > \"$tsort_out\"\n+\n+LC_ALL=C sort \"$rev_map\" | uniq > \"$rev_map_uniq\"\n+while read sha1 rev; do\n+\tprintf \"s#%s#%s#\\n\" \"$sha1\" \"$rev\"\n+done < \"$rev_map_uniq\" > \"$rev_map_sed\"\n+\n+sed -f \"$rev_map_sed\" \"$tsort_out\"\n-- \ntg: (370a0fd..) t/queue-movement (depends on: master)\n"},{"id":"299063","messageId":"1221818101-14333-2-git-send-email-bert.wesarg@googlemail.com","threadId":"15622","inReplyTo":"1221818101-14333-1-git-send-email-bert.wesarg@googlemail.com","subject":"[TopGit PATCH] tg-patch: add From/Date: line to header and print to file","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2008-09-19T09:55:01Z","receivedAt":"2008-09-19T09:55:01Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"To make this more similar to git format-patch, I added a 'From' and\na 'Date:' header and let 'tg patch' print to a file (which is shown as output).\n\nRegards\nBert\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n\n---\n tg-patch.sh |   25 ++++++++++++++++++++++++-\n 1 files changed, 24 insertions(+), 1 deletions(-)\n\ndiff --git a/tg-patch.sh b/tg-patch.sh\nindex 7a24718..5fc5cfd 100644\n--- a/tg-patch.sh\n+++ b/tg-patch.sh\n@@ -24,7 +24,26 @@ done\n base_rev=\"$(git rev-parse --short --verify \"refs/top-bases/$name\" 2>/dev/null)\" ||\n \tdie \"not a TopGit-controlled branch\"\n \n-git cat-file blob \"$name:.topmsg\"\n+subject=\"$(git cat-file blob \"$name:.topmsg\" | grep '^Subject: ' | sed -e 's/^Subject: //' -e 's/\\[.*\\] //')\"\n+file_name=\"$(echo \"$subject\" | tr -c '[[:alnum:]_.]' '_').patch\"\n+rev=\"$(git rev-parse --verify \"refs/heads/$name\" 2>/dev/null)\"\n+\n+echo \"$file_name\"\n+exec 3>&1\n+exec 1>\"$file_name\"\n+\n+printf \"From %s Mon Sep 17 00:00:00 2001\\n\" \"$rev\"\n+now=\"$(date --rfc-2822)\"\n+git cat-file blob \"$name:.topmsg\" |\n+\tawk '\n+\t\t{\n+\t\t\tprint\n+\t\t\tif (/^From:/ && !date_printed) {\n+\t\t\t\tprintf \"Date: %s\\n\", \"'\"$now\"'\"\n+\t\t\t\tdate_printed = 1\n+\t\t\t}\n+\t\t}\n+\t'\n echo\n [ -n \"$(git grep '^[-]--' \"$name\" -- \".topmsg\")\" ] || echo '---'\n \n@@ -42,5 +61,9 @@ rm \"$git_is_stupid\"\n \n echo '-- '\n echo \"tg: ($base_rev..) $name (depends on: $(git cat-file blob \"$name:.topdeps\" | paste -s -d' '))\"\n+\n+exec 1>&3\n+exec 3>&-\n+\n branch_contains \"$name\" \"$base_rev\" ||\n \techo \"tg: The patch is out-of-date wrt. the base! Run \\`$tg update\\`.\"\n-- \ntg: (7ec3927..) t/patch (depends on: t/queue-movement)\n"},{"id":"91313","messageId":"20080922153614.GO10360@machine.or.cz","threadId":"15622","inReplyTo":"1221818101-14333-1-git-send-email-bert.wesarg@googlemail.com","subject":"Re: [TopGit PATCH] prev/next/tsort: commands to explore dependencies","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-09-22T15:36:14Z","receivedAt":"2008-09-22T15:36:14Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\nOn Fri, Sep 19, 2008 at 11:55:00AM +0200, Bert Wesarg wrote:\n> I hacked 3 commands to explore the dependencies of TopGit patches:\n\n  thanks, the idea of all three commands is good,\n\n>   I) tg prev [NAME]\n>      outputs the dependencies of NAME\n> \n>  II) tg next [NAME]\n>      outputs patches that depends on NAME\n\n  but I think it would be cleaner to add this functionality to\ntg info...\n\n> III) tg tsort [PATTERN]\n>      outputs a topological order of all patches starting with PATTERN\n\n...and tg summary (overally, to have a tree view of branches).\n\n> diff --git a/tg-tsort.sh b/tg-tsort.sh\n> new file mode 100644\n> index 0000000..8a7376a\n> --- /dev/null\n> +++ b/tg-tsort.sh\n..snip..\n> +\t\t\t\t\tprintf \"%s\\t%q\\n\" \"${dep_rev}\" \"${dep}\" >&3\n> +\t\t\t\t\tprintf \"%s\\t%s\\n\" \"${topic_rev}\" \"${dep_rev}\"\n\n%q?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nThe next generation of interesting software will be done\non the Macintosh, not the IBM PC.  -- Bill Gates\n"},{"id":"91314","messageId":"20080922153938.GP10360@machine.or.cz","threadId":"15622","inReplyTo":"1221818101-14333-2-git-send-email-bert.wesarg@googlemail.com","subject":"Re: [TopGit PATCH] tg-patch: add From/Date: line to header and print to file","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-09-22T15:39:38Z","receivedAt":"2008-09-22T15:39:38Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Fri, Sep 19, 2008 at 11:55:01AM +0200, Bert Wesarg wrote:\n> To make this more similar to git format-patch, I added a 'From' and\n> a 'Date:' header and let 'tg patch' print to a file (which is shown as output).\n> \n> Regards\n> Bert\n> \n> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n\nI dislike the anyway completely bogus From line. If you want mbox\nformat, you should call (hypothetical) tg mail. Also, IMHO Date: should\nbe simply always printed at the end of the header, it's distracting if\nit is higher.\n\nAlso, the writing to file is confusing to me. What are you trying to\nachieve? If you want to export patches, why not use 'tg export' which\nalready has this functionality? To me, 'tg patch' is basically\nequivalent of 'git show' for the whole branch.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nThe next generation of interesting software will be done\non the Macintosh, not the IBM PC.  -- Bill Gates\n"},{"id":"91330","messageId":"36ca99e90809221032x3003c1f7q8ef09cb92a0473ad@mail.gmail.com","threadId":"15622","inReplyTo":"20080922153614.GO10360@machine.or.cz","subject":"Re: [TopGit PATCH] prev/next/tsort: commands to explore dependencies","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2008-09-22T17:32:50Z","receivedAt":"2008-09-22T17:32:50Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Sep 22, 2008 at 17:36, Petr Baudis <pasky@suse.cz> wrote:\n>  Hi,\n>\n> On Fri, Sep 19, 2008 at 11:55:00AM +0200, Bert Wesarg wrote:\n>> I hacked 3 commands to explore the dependencies of TopGit patches:\n>\n>  thanks, the idea of all three commands is good,\n>\n>>   I) tg prev [NAME]\n>>      outputs the dependencies of NAME\n>>\n>>  II) tg next [NAME]\n>>      outputs patches that depends on NAME\n>\n>  but I think it would be cleaner to add this functionality to\n> tg info...\nRight, but 'tg next' is shorter than any 'tg info --next'.\n\n>\n>> III) tg tsort [PATTERN]\n>>      outputs a topological order of all patches starting with PATTERN\n>\n> ...and tg summary (overally, to have a tree view of branches).\nMaybe something like the graph output from git rev-log --graph?\n\n>> +                                     printf \"%s\\t%q\\n\" \"${dep_rev}\" \"${dep}\" >&3\n>> +                                     printf \"%s\\t%s\\n\" \"${topic_rev}\" \"${dep_rev}\"\n>\n> %q?\n\n\"and %q causes printf to output the corresponding argument in  a\nformat that can be reused as shell input.\"\n\nI thought that this would be needed.\n\nBert\n>\n> --\n>                                Petr \"Pasky\" Baudis\n"},{"id":"91334","messageId":"36ca99e90809221110k2d4be91co8eae665fe4735ed1@mail.gmail.com","threadId":"15622","inReplyTo":"20080922153938.GP10360@machine.or.cz","subject":"Re: [TopGit PATCH] tg-patch: add From/Date: line to header and print to file","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2008-09-22T18:10:51Z","receivedAt":"2008-09-22T18:10:51Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Sep 22, 2008 at 17:39, Petr Baudis <pasky@suse.cz> wrote:\n> On Fri, Sep 19, 2008 at 11:55:01AM +0200, Bert Wesarg wrote:\n>> To make this more similar to git format-patch, I added a 'From' and\n>> a 'Date:' header and let 'tg patch' print to a file (which is shown as output).\n>>\n>> Regards\n>> Bert\n>>\n>> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n>\n> I dislike the anyway completely bogus From line. If you want mbox\n> format, you should call (hypothetical) tg mail. Also, IMHO Date: should\n> be simply always printed at the end of the header, it's distracting if\n> it is higher.\n>\n> Also, the writing to file is confusing to me. What are you trying to\n> achieve? If you want to export patches, why not use 'tg export' which\n> already has this functionality? To me, 'tg patch' is basically\n> equivalent of 'git show' for the whole branch.\n\nYou're right. I'm not familiar what is needed as a header to be used\nwith git send-email.\n\nBut the additional indirection with tg export/git format-patch is\noverkill for one patch.\n\nTherefore I would leave the writing to file, but drop the additional\nheaders for me.\n\nBert\n>\n> --\n>                                Petr \"Pasky\" Baudis\n"},{"id":"91339","messageId":"20080922201025.GB792@strlen.de","threadId":"15622","inReplyTo":"36ca99e90809221032x3003c1f7q8ef09cb92a0473ad@mail.gmail.com","subject":"Re: [TopGit PATCH] prev/next/tsort: commands to explore dependencies","fromName":"Uwe Kleine-König","fromEmail":"ukleinek@strlen.de","sentAt":"2008-09-22T20:10:25Z","receivedAt":"2008-09-22T20:10:25Z","isPatch":true,"sender":{"key":"ukleinek@strlen.de","avatar":"https://gravatar.com/avatar/71e008a89bd4c9d95c03e4823fa14b01e7f658bfc746c8a735286b945417f2d6?d=mp&s=160"},"body":"On Mon, Sep 22, 2008 at 07:32:50PM +0200, Bert Wesarg wrote:\n> On Mon, Sep 22, 2008 at 17:36, Petr Baudis <pasky@suse.cz> wrote:\n> >  Hi,\n> >\n> > On Fri, Sep 19, 2008 at 11:55:00AM +0200, Bert Wesarg wrote:\n> >> I hacked 3 commands to explore the dependencies of TopGit patches:\n> >\n> >  thanks, the idea of all three commands is good,\n> >\n> >>   I) tg prev [NAME]\n> >>      outputs the dependencies of NAME\n> >>\n> >>  II) tg next [NAME]\n> >>      outputs patches that depends on NAME\n> >\n> >  but I think it would be cleaner to add this functionality to\n> > tg info...\n> Right, but 'tg next' is shorter than any 'tg info --next'.\n> \n> >\n> >> III) tg tsort [PATTERN]\n> >>      outputs a topological order of all patches starting with PATTERN\n> >\n> > ...and tg summary (overally, to have a tree view of branches).\n> Maybe something like the graph output from git rev-log --graph?\n> \n> >> +                                     printf \"%s\\t%q\\n\" \"${dep_rev}\" \"${dep}\" >&3\n> >> +                                     printf \"%s\\t%s\\n\" \"${topic_rev}\" \"${dep_rev}\"\n> >\n> > %q?\n> \n> \"and %q causes printf to output the corresponding argument in  a\n> format that can be reused as shell input.\"\nWith /bin/sh == dash this doesn't work.  I havn't looked where and how\nthis is used, but rev-parse has an --sq option that results in the\noutput being shell quoted.  Maybe this can help?\n\nBest regards\nUwe\n"},{"id":"91340","messageId":"36ca99e90809221318t1a690cdbq3456e69939a5b5e1@mail.gmail.com","threadId":"15622","inReplyTo":"20080922201025.GB792@strlen.de","subject":"Re: [TopGit PATCH] prev/next/tsort: commands to explore dependencies","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2008-09-22T20:18:52Z","receivedAt":"2008-09-22T20:18:52Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Sep 22, 2008 at 22:10, Uwe Kleine-König <ukleinek@strlen.de> wrote:\n> On Mon, Sep 22, 2008 at 07:32:50PM +0200, Bert Wesarg wrote:\n>> On Mon, Sep 22, 2008 at 17:36, Petr Baudis <pasky@suse.cz> wrote:\n>> >  Hi,\n>> >\n>> > On Fri, Sep 19, 2008 at 11:55:00AM +0200, Bert Wesarg wrote:\n>> >> I hacked 3 commands to explore the dependencies of TopGit patches:\n>> >\n>> >  thanks, the idea of all three commands is good,\n>> >\n>> >>   I) tg prev [NAME]\n>> >>      outputs the dependencies of NAME\n>> >>\n>> >>  II) tg next [NAME]\n>> >>      outputs patches that depends on NAME\n>> >\n>> >  but I think it would be cleaner to add this functionality to\n>> > tg info...\n>> Right, but 'tg next' is shorter than any 'tg info --next'.\n>>\n>> >\n>> >> III) tg tsort [PATTERN]\n>> >>      outputs a topological order of all patches starting with PATTERN\n>> >\n>> > ...and tg summary (overally, to have a tree view of branches).\n>> Maybe something like the graph output from git rev-log --graph?\n>>\n>> >> +                                     printf \"%s\\t%q\\n\" \"${dep_rev}\" \"${dep}\" >&3\n>> >> +                                     printf \"%s\\t%s\\n\" \"${topic_rev}\" \"${dep_rev}\"\n>> >\n>> > %q?\n>>\n>> \"and %q causes printf to output the corresponding argument in  a\n>> format that can be reused as shell input.\"\n> With /bin/sh == dash this doesn't work.  I havn't looked where and how\n> this is used, but rev-parse has an --sq option that results in the\n> output being shell quoted.  Maybe this can help?\nI'm unsure if this quoting is actually needed.\n\nI build a map from revision (sha1) to topic name:\n\n  abc..\\tt/topic\n\nand use this file (after |sort|uniq) to build a sed script which\nreplaces sha1 with the topic name in the output  from tsort:\n\n s#abc...#t/topic#\n\nMaybe the quoting is not needed.\n\nBert\n\n>\n> Best regards\n> Uwe\n>\n"},{"id":"91479","messageId":"20080924152318.GX10360@machine.or.cz","threadId":"15622","inReplyTo":"36ca99e90809221032x3003c1f7q8ef09cb92a0473ad@mail.gmail.com","subject":"Re: [TopGit PATCH] prev/next/tsort: commands to explore dependencies","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-09-24T15:23:18Z","receivedAt":"2008-09-24T15:23:18Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Mon, Sep 22, 2008 at 07:32:50PM +0200, Bert Wesarg wrote:\n> On Mon, Sep 22, 2008 at 17:36, Petr Baudis <pasky@suse.cz> wrote:\n> >  Hi,\n> >\n> > On Fri, Sep 19, 2008 at 11:55:00AM +0200, Bert Wesarg wrote:\n> >> I hacked 3 commands to explore the dependencies of TopGit patches:\n> >\n> >  thanks, the idea of all three commands is good,\n> >\n> >>   I) tg prev [NAME]\n> >>      outputs the dependencies of NAME\n> >>\n> >>  II) tg next [NAME]\n> >>      outputs patches that depends on NAME\n> >\n> >  but I think it would be cleaner to add this functionality to\n> > tg info...\n> Right, but 'tg next' is shorter than any 'tg info --next'.\n\nSo, an alias? ;-) I wouldn't really like to clutter the UI with many\ntrivial commands for getting various sort of info. And I mean, ideally\nyou could just see all this in default 'tg info' output (or for\ncomputationally expensive operations, maybe 'tg info -l'?).\n\n> >\n> >> III) tg tsort [PATTERN]\n> >>      outputs a topological order of all patches starting with PATTERN\n> >\n> > ...and tg summary (overally, to have a tree view of branches).\n> Maybe something like the graph output from git rev-log --graph?\n\nThat would be excellent.\n\n> >> +                                     printf \"%s\\t%q\\n\" \"${dep_rev}\" \"${dep}\" >&3\n> >> +                                     printf \"%s\\t%s\\n\" \"${topic_rev}\" \"${dep_rev}\"\n> >\n> > %q?\n> \n> \"and %q causes printf to output the corresponding argument in  a\n> format that can be reused as shell input.\"\n> \n> I thought that this would be needed.\n\nInteresting, I didn't find that in my documentation. But as said later,\nthis quoting is probably unnecessary.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nPeople who take cold baths never have rheumatism,\nbut they have cold baths.\n"}]}