From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 13 Sep 2006 21:06:43 +0400 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20060913170643.GU17693@localhost.localdomain> Mail-Followup-To: ALT Devel discussion list References: <20060913163752.GH28258@nomad.office.altlinux.org> <20060913170451.GT17693@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PSXRUCbmiibGgnYg" Content-Disposition: inline In-Reply-To: <20060913170451.GT17693@localhost.localdomain> Subject: Re: [devel] perl.git X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.7 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2006 17:06:57 -0000 Archived-At: List-Archive: List-Post: --PSXRUCbmiibGgnYg Content-Type: multipart/mixed; boundary="juwRYO7N74otsfNI" Content-Disposition: inline --juwRYO7N74otsfNI Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 13, 2006 at 09:04:51PM +0400, Alexey Tourbin wrote: > =EE=C1 =D7=D3=D1=CB=C9=CA =D3=CC=D5=DE=C1=CA =D0=D2=C9=CC=C1=C7=C1=C0 =D3= =CB=D2=C9=D0=D4, =CB=CF=D4=CF=D2=D9=CA =C9=C8 =C9=CD=CF=D2=D4=C9=D2=D5=C5= =D4. =F7=CF=D4 =CF=CE. --juwRYO7N74otsfNI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=apc #!/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 ' 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 --juwRYO7N74otsfNI-- --PSXRUCbmiibGgnYg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFCDqjfBKgtDjnu0YRApHJAKCd0yGhBNL9VdvCxrq0RszJvZHDPwCg4bXq YVnHPyurkqRJ4BHdvJ2Fx38= =7VaS -----END PGP SIGNATURE----- --PSXRUCbmiibGgnYg--