git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: git@vger.kernel.org, pasky@suse.cz,
	martin f krafft <madduck@madduck.net>
Subject: Re: [TopGit PATCH 1/4] provide fan-in and -out traversal interface
Date: Tue, 5 Oct 2010 09:54:48 +0200	[thread overview]
Message-ID: <AANLkTi=wZUc0GnB8p0=3Hkd1xPsvqqdEMHn80GKsHUj6@mail.gmail.com> (raw)
In-Reply-To: <20101005071334.GF11737@pengutronix.de>

2010/10/5 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> On Tue, Oct 05, 2010 at 12:28:17AM +0200, Bert Wesarg wrote:
>> This adds general functions to get the list of all offending branches for
> Is offending the right word here?  I don't understand that.

I'm unsure about the right wording here too. 'offending' is definitive
the wrong word here. Somethink like this may be better:

This adds general functions to get the list of all branches which
either depends on a given one (fan-in), or all dependencies of a given
one (fan-out).

>
>> a given one. Either which depends on the given branch (fan-in) or all
>> dependencies (fan-out).
>>
>> Two simple users are provided which just lists the names or generates dot
>> input.
> This should then be used for tg summary --graphviz, too, doesn't it?

No. tg summary --graphviz outputs the whole graph. These will generate
only a subgraph based on a given topic. tg summary does not take a
topic as argument.

>
>>
>> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>>
>> ---
>>  tg.sh |  170 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 170 insertions(+), 0 deletions(-)
>>
>> diff --git a/tg.sh b/tg.sh
>> index 3718702..926b31b 100644 tg.sh
>> --- a/tg.sh
>> +++ b/tg.sh
>> @@ -351,6 +351,176 @@ setup_pager()
>>       trap "exec >&-; rm \"$_pager_fifo\"; rmdir \"$_pager_fifo_dir\"; wait" EXIT
>>  }
>>
>> +# traverse_fan_out(for_each_name, for_each_dep, name, head_deps)
> This uses an unusual format.
>
> please make it
>
> # traverse_fan_out FOR_EACH_NAME FOR_EACH_DEP NAME HEAD_DEPS
>

Yes. this makes it more consistent.

>> +#
>> +# traverse the dependencies of @name in bfs order and call @for_each_name
>> +# on each dep (i.e. node) and @for_each_dep on all dependencies (i.e. edge)
>> +# with source and dest as arguments.
>> +#
>> +# @name' needs to be a TopGit controlled branch
>> +#
>> +# @head_deps specifies where to take the .topdeps from for the HEAD branch
>> +# empty - from the committed tree
>> +# '(i)' - from the index
>> +# '(w)' - from the working dir
>> +#
>> +traverse_fan_out()
>> +{
>> +     local for_each_name=$1
>> +     local for_each_dep=$2
>> +     local name=$3
>> +     local head_deps=$4 || :
>> +     local deps_src
>> +     local head="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')" || :
> I don't remember the exact problems, but some shells get using local and
> assignment in a single command wrong.  Can you please fix that up?  (I
> fixed that up for one of your commits.)

Yes, that should be the right thing to do.

Bert

  reply	other threads:[~2010-10-05  7:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 22:28 [TopGit PATCH 1/4] provide fan-in and -out traversal interface Bert Wesarg
2010-10-04 22:28 ` [TopGit PATCH 2/4] tg-depend: reduce: apply transitive reduction to the dependecies Bert Wesarg
2010-10-04 22:28   ` [TopGit PATCH 3/4] tg-prev/tg-next: --all option Bert Wesarg
2010-10-04 22:28     ` [TopGit PATCH v4 4/4] tg-graph: print dependency graph like git log --graph Bert Wesarg
2010-10-05  7:13 ` [TopGit PATCH 1/4] provide fan-in and -out traversal interface Uwe Kleine-König
2010-10-05  7:54   ` Bert Wesarg [this message]
2010-10-05 19:31     ` [TopGit PATCH v2] " Bert Wesarg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=wZUc0GnB8p0=3Hkd1xPsvqqdEMHn80GKsHUj6@mail.gmail.com' \
    --to=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=madduck@madduck.net \
    --cc=pasky@suse.cz \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).