Re: [TopGit PATCH 2/2] tg-import.sh: A dump quilt queue importer

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

 



On Sat, Aug 9, 2008 at 02:57, Petr Baudis <pasky@xxxxxxx> wrote:
> On Fri, Aug 08, 2008 at 08:19:48PM +0200, Bert Wesarg wrote:
>> +tg import
>> +~~~~~~~~~
>> +     Import a quilt queue into TopGit. First argument is the series
>> +     file from quilt. Second is the prefix for the topic names
>> +     (i.e. "t/"). All remaining arguments are the dependencies for
>> +     the first patch in the series.
>
> Sensible usage, but I'm not happy with making tg import quilt-only;
> what if we will say want to import to topgit from existing branches,
> or from StGIT or something else? The command name is good, but maybe
> I'd add a required --quilt switch. After all, this is not a command you
> run three times a day by hand.
Your absolutly right, that import should not be quilt specific. It was
just what I currently need, so I made it.

>
>> + Use '-s' if you want to strip
>> +     common patch suffixes from the patch file name (like .diff and
>> +     .patch).
>
> When *wouldn't* we want to do this? Doesn't it make sense to make this
> the default?
I suggest never ;-)

>> +             # add all modified files from patch to index
>> +             # (and prepending it with $root_dir)
>> +             # be stupid, hard coded -p1 --strip=1
>> +             lsdiff --strip=1 "$patchfile" |
>> +                     sed -e "s/^/$root_dir_esc\//" |
>> +                     xargs git add
>
> lsdiff? I don't have this tool. And this won't work with file removals
> properly anyway.
lsdiff comes with the patchutils package.

>
> I guess git add -u is too new for us, so you might opt for this snippet
> I've used in git-filter-branch:
>
>        (
>                git diff-index -r --name-only HEAD
>                git ls-files --others
>        ) |
>        git update-index --add --replace --remove --stdin
>
> Or even better, use git apply?
Ohh yeah, that sounds reasonable. Sometimes it an be so easy.

Thanks for the comments and input.

Bert
>
> --
>                                Petr "Pasky" Baudis
--
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