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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, Aug 15, 2008 at 15:53, Jan Nieuwenhuizen <janneke-list@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux