From: Alexey Tourbin <at@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] perl.git
Date: Wed, 13 Sep 2006 21:06:43 +0400
Message-ID: <20060913170643.GU17693@localhost.localdomain> (raw)
In-Reply-To: <20060913170451.GT17693@localhost.localdomain>
[-- Attachment #1.1: Type: text/plain, Size: 136 bytes --]
On Wed, Sep 13, 2006 at 09:04:51PM +0400, Alexey Tourbin wrote:
> На всякий случай прилагаю скрипт, который их имортирует.
Вот он.
[-- Attachment #1.2: apc --]
[-- Type: text/plain, Size: 1883 bytes --]
#!/bin/sh -e
diffs=~/perl-5.8.x-diffs
source0=~/RPM/SOURCES/perl-5.8.0.tar.bz2
workdir=~/tmp/perl-git
rm -rf "$workdir"
mkdir "$workdir"
cd "$workdir"
tar xf "$source0"
mv perl-5.8.0 perl
cd perl
mtime=`find -type f -printf '%T@\n' |sort -u -rn |head -1`
# HACK
find -type f -print0 |xargs -r0 perl -pi -e 's/\r\n/\n/'
git-init-db
git-add .
faketime -d "1970-01-01 $mtime seconds" -- \
git-commit -a -m "imported perl-5.8.0 sources" --author 'pumpking <pumpking@perl>'
git-checkout -b perl-5.8
git-branch -D master
for diff in $diffs/*[0-9].gz; do
[ -f "${diff%%.gz}.my.gz" ] && diff=${diff%%.gz}.my.gz
echo " *** $diff"
head=$(zcat "$diff" |head -1)
set -- $head
change=$2
who=$4
date="$6 $7"
message=$(zcat "$diff" |grep -m1 -B999 '^Affected files')
message=$(echo "$message" |cat -s |sed '1{/^Change /d};${/^Affected files/d}')
message=$(echo "$message" |sed '1{/^$/d};${/^$/d}')
message=$(echo -n "Change $change:"; echo "$message" |head -1 |sed 's/^[[:space:]]*/ /';
echo; echo "$message"; echo)
affected=$(zcat "$diff"|sed -n '/^Affected files/,/^Differences/p')
affected=$(echo "$affected" |grep -F //depot/maint-5.8/perl/)
affected=$(echo "$affected" |sed 's|.*//depot/maint-5.8/perl/|\t|;s|#[0-9]\+[[:space:]]\+|\t|')
hasdiff=1 hasCRLF=
if zcat "$diff" |grep -qs '^--- '; then
n1=`zcat "$diff" |wc -c`
n2=`zcat "$diff" |perl -pe 's/\r\n/\n/' |wc -c`
[ $n1 = $n2 ] || hasCRLF=1
zcat "$diff" |perl -pe 's/\r\n/\n/' |patch -p1
else
hasdiff=
fi
hasrm=
while read -r file action; do
if [ "$action" = delete ]; then
hasrm=1
git-rm -f -v "$file"
else
git-add "$file"
fi
done <<<"$affected"
if [ -z "$hasdiff" -a -z "$hasrm" ]; then
echo "no changes in $diff"
continue
fi
author=${who%%@*}
author="$author <$who>"
faketime -d "$date" -- \
git-commit -a -m "$message" --author "$author" || [ -n "$hasCRLF" ]
done
echo ok
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-09-13 17:06 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-13 16:37 [devel] IQ: git.altlinux.org: archive/Sisyphus conversion Dmitry V. Levin
2006-09-13 17:04 ` [devel] perl.git Alexey Tourbin
2006-09-13 17:06 ` Alexey Tourbin [this message]
2006-09-13 18:42 ` Alexey Tourbin
2006-09-13 20:46 ` Dmitry V. Levin
2006-09-13 20:55 ` Alexey Tourbin
2006-09-13 21:09 ` [devel] refs/heads/* Dmitry V. Levin
2006-09-14 8:46 ` Sergey Vlasov
2006-09-16 14:45 ` [devel] perl.git Alexey Tourbin
2006-09-16 14:55 ` Dmitry V. Levin
2006-09-16 16:50 ` Alexey Tourbin
2006-09-16 16:52 ` Dmitry V. Levin
2006-09-17 5:54 ` Alexey Tourbin
2006-09-17 5:56 ` Alexey Tourbin
2006-09-29 13:51 ` [devel] unannotated tags (Re: perl.git) Sergey Vlasov
2006-09-29 16:45 ` Dmitry V. Levin
2006-09-13 22:59 ` [devel] IQ: git.altlinux.org: archive/Sisyphus conversion Kirill Maslinsky
2006-09-13 20:47 ` Dmitry V. Levin
2006-09-14 8:59 ` Sergey Vlasov
2006-09-14 10:26 ` Grigory Batalov
2006-09-14 12:17 ` Dmitry V. Levin
2006-09-14 12:27 ` Dmitry V. Levin
2006-09-14 12:40 ` Grigory Batalov
2006-09-15 14:34 ` Kirill Maslinsky
2006-09-15 22:47 ` Dmitry V. Levin
2006-09-14 16:05 ` Kirill Maslinsky
2006-09-15 22:43 ` Dmitry V. Levin
2006-09-15 22:59 ` Alexey Tourbin
2006-09-16 5:34 ` Kirill Maslinsky
2006-09-16 7:32 ` Michael Shigorin
2006-09-16 13:52 ` Dmitry V. Levin
2006-09-24 20:50 ` Alexey Rusakov
2006-09-16 7:39 ` Michael Shigorin
2006-09-16 13:57 ` Dmitry V. Levin
2006-09-22 20:41 ` Dmitry V. Levin
2006-09-26 13:18 ` Vitaly Ostanin
2006-09-26 22:26 ` Dmitry V. Levin
2006-09-27 10:11 ` [devel] hasher with old sisyphus (was: IQ: git.altlinux.org: archive/Sisyphus conversion) Vitaly Ostanin
2006-09-27 22:31 ` Dmitry V. Levin
2006-09-28 3:29 ` Hihin Ruslan
2006-09-28 11:19 ` [devel] hasher with old sisyphus Vitaly Ostanin
2006-09-29 16:44 ` Dmitry V. Levin
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=20060913170643.GU17693@localhost.localdomain \
--to=at@altlinux.ru \
--cc=devel@lists.altlinux.org \
/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
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git