git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [TopGit PATCH] tg redepend: New command.

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Sep 1, 2008, 09:31 UTC
Message-ID
<36ca99e90809010231o439ab4acsaa3027366c551ff6@mail.gmail.com>
In-Reply-To
<1218808427.25300.2.camel@heerbeest>
Hi,
On Fri, Aug 15, 2008 at 15:53, Jan Nieuwenhuizen <janneke-list@xs4all.nl> wrote:
Show 7 quoted lines
> 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.

Show 15 quoted lines
> +
> +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
Previous: Jan NieuwenhuizenNext: Jan Nieuwenhuizen
Message 5 of 7 in “tg redepend: New command.”
  1. tg redepend: New command.Jan Nieuwenhuizen, Aug 15, 2008
  2. Bert WesargAug 15, 2008
  3. Jonathan NiederAug 15, 2008
  4. Jan NieuwenhuizenAug 18, 2008
  5. Bert WesargSep 1, 2008
  6. Jan NieuwenhuizenSep 1, 2008
  7. Bert WesargSep 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.