From: "Bert Wesarg" <bert.wesarg@googlemail.com>
To: "Jan Nieuwenhuizen" <janneke-list@xs4all.nl>
Cc: git <git@vger.kernel.org>, "Jan Holesovsky" <kendy@suse.cz>
Subject: Re: [TopGit PATCH] tg redepend: New command.
Date: Mon, 1 Sep 2008 11:31:15 +0200 [thread overview]
Message-ID: <36ca99e90809010231o439ab4acsaa3027366c551ff6@mail.gmail.com> (raw)
In-Reply-To: <1218808427.25300.2.camel@heerbeest>
Hi,
On Fri, Aug 15, 2008 at 15:53, Jan Nieuwenhuizen <janneke-list@xs4all.nl> wrote:
> As discussed previously
>
> http://kerneltrap.org/mailarchive/git/2008/8/13/2925144
>
> Change a topgit branch's dependencies by doing a rebase-by-merge.
>
>
is this script in use by you, or is it abandoned in favor of another idea?
Anyway, I have tried it today but it looks like the top-bases wasn't
updated to the new deps. It points still to the old base. Second, I
got an empty line in my .topdeps file.
> +
> +if [ -n "$add" ]; then
> + add="${add/# }"
> + add="${add// / }"
> + dupes=$(grep -E "^${add// /|}/\$" "$root_dir/.topdeps" | tr '\n' ' ')
> + [ -z "$dupes" ] || die "already depend on: $dupes"
> + redeps=$(echo "$add" | cat "$root_dir/.topdeps" - | tr '\n' ' ' | sed -e 's/ \+$//')
> +elif [ -n "$remove" ]; then
> + remove="${remove// / }"
> + remove="${remove/# }"
> + avail=$(grep -E "^${remove// /|}/\$" "$root_dir/.topdeps" | sort | tr '\n' ' ')
> + remove_sorted=$(echo "$remove" | tr ' ' '\n' | grep -v '^$' | sort | tr '\n' ' ')
> + [ "$avail" = "$remove_sorted" ] || die "not depending on some of: $remove"
> + redeps=$(grep -vE "^${remove// /|}/\$" "$root_dir/.topdeps" | tr '\n' ' ')
> +fi
IMHO all these "| tr '\n' ' '" aren't needed. bash do the right thing here.
Bert
next prev parent reply other threads:[~2008-09-01 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 13:53 [TopGit PATCH] tg redepend: New command Jan Nieuwenhuizen
2008-08-15 17:16 ` Bert Wesarg
2008-08-15 18:20 ` Jonathan Nieder
2008-08-18 9:23 ` Jan Nieuwenhuizen
2008-09-01 9:31 ` Bert Wesarg [this message]
2008-09-01 10:11 ` Jan Nieuwenhuizen
2008-09-01 10:36 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36ca99e90809010231o439ab4acsaa3027366c551ff6@mail.gmail.com \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=janneke-list@xs4all.nl \
--cc=kendy@suse.cz \
/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.
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 NNTP newsgroup(s).