Thread (9 messages) flat view 9 messages, 3 authors, 2016-08-13

Re: [TopGit PATCH] prev/next/tsort: commands to explore dependencies

From: Bert Wesarg <hidden>
Date: 2016-06-15 22:45:23

On Mon, Sep 22, 2008 at 22:10, Uwe Kleine-König [off-list ref] wrote:
On Mon, Sep 22, 2008 at 07:32:50PM +0200, Bert Wesarg wrote:
quoted
On Mon, Sep 22, 2008 at 17:36, Petr Baudis [off-list ref] wrote:
quoted
 Hi,

On Fri, Sep 19, 2008 at 11:55:00AM +0200, Bert Wesarg wrote:
quoted
I hacked 3 commands to explore the dependencies of TopGit patches:
 thanks, the idea of all three commands is good,
quoted
  I) tg prev [NAME]
     outputs the dependencies of NAME

 II) tg next [NAME]
     outputs patches that depends on NAME
 but I think it would be cleaner to add this functionality to
tg info...
Right, but 'tg next' is shorter than any 'tg info --next'.
quoted
quoted
III) tg tsort [PATTERN]
     outputs a topological order of all patches starting with PATTERN
...and tg summary (overally, to have a tree view of branches).
Maybe something like the graph output from git rev-log --graph?
quoted
quoted
+                                     printf "%s\t%q\n" "${dep_rev}" "${dep}" >&3
+                                     printf "%s\t%s\n" "${topic_rev}" "${dep_rev}"
%q?
"and %q causes printf to output the corresponding argument in  a
format that can be reused as shell input."
With /bin/sh == dash this doesn't work.  I havn't looked where and how
this is used, but rev-parse has an --sq option that results in the
output being shell quoted.  Maybe this can help?
I'm unsure if this quoting is actually needed.

I build a map from revision (sha1) to topic name:

  abc..\tt/topic

and use this file (after |sort|uniq) to build a sed script which
replaces sha1 with the topic name in the output  from tsort:

 s#abc...#t/topic#

Maybe the quoting is not needed.

Bert
Best regards
Uwe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help