[Portland] xdg-utils upstream status
Pablo Castellano
pablog.ubuntu at gmail.com
Sat Oct 9 06:42:25 PDT 2010
I've tried the script. It has worked well for me with a bit of refining.
I'm attaching here my modified version.
On Thu, 2010-09-30 at 16:24 -0500, Jonathan Nieder wrote:
> Fathi Boudra wrote:
>
> > ok, let's move to git
>
> Something like the following should do it.
>
> Thoughts? Improvements?
>
> mkdir /tmp/conversion &&
> cd /tmp/conversion &&
> apt-get install cvs2svn git &&
> cat >authors.txt <<\END_AUTHORS_DOT_TXT &&
> bastian = Waldo Bastian <waldo.bastian at intel.com>
> bryce = Bryce Harrington <bryce at bryceharrington.org>
> cworth = Carl Worth <cworth at cworth.org>
> fabo = Fathi Boudra <fabo at freedesktop.org>
> jwhite = Jeremy White <jwhite at codeweavers.com>
> krake = Kevin Krammer <kevin.krammer at gmx.at>
> llunak = Lubos Lunak <l.lunak at suse.cz>
> micke = Mikael Hallendal <micke at imendio.com>
> mr = Mikhail Ramendik <mr at ramendik.ru>
> norbertf = Norbert Frese <nf2 at scheinwelt.at>
> rdieter = Rex Dieter <rdieter at math.unl.edu>
> whipple = Tom Whipple <tw at tomwhipple.com>
> importer = cvs2git <cvs2git>
> END_AUTHORS_DOT_TXT
>
> cat >portland-git.sh <<\END_PORTLAND_GIT_SCRIPT &&
> #!/bin/sh
> set -e
> authors_file=$(pwd)/authors.txt
> export authors_file
> fetch_cvs () {
> rsync -avzP freedesktop.org::cvs/portland .
> }
> convert_from_cvs () {
> git init --bare portland-git.git &&
> cvs2git --blobfile=/dev/fd/3 --dumpfile=/dev/fd/3 \
> --username=importer --encoding=latin-1 --encoding=utf-8 \
> portland 3>&1 >&2 |
> (
> cd portland-git.git &&
> git fast-import &&
> git gc --aggressive
> )
> }
> delete_orig_refs () {
> # clean up after filter-branch.
> eval "$(
> git for-each-ref --shell \
> --format='git update-ref -d %(refname) &&' \
> refs/original &&
> echo :
> )"
> }
> clean_tags () {
> eval "$(
> git for-each-ref --shell --format='
> ref=%(refname) &&
> new_ref=$(echo "$ref" |
> sed -e "
> s/RELEASE_TP/tmp/
> s/RELEASE_/v/
> s/_BETA_/-beta/
> s/_RC/-rc/
> s/_/./g
> "
> ) &&
> echo "$ref -> $new_ref" &&
> git update-ref -d "$ref" &&
> git update-ref "$new_ref" %(objectname) &&
> ' &&
> echo :
> )"
> }
> clean_repo () {
> git filter-branch --env-filter '
> get_name () {
> grep "^$1 =" "$authors_file" |
> sed "s/^.*= \(.*\) <.*>$/\1/"
> }
>
> get_email () {
> grep "^$1 =" "$authors_file" |
> sed "s/^.*= .* <\(.*\)>$/\1/"
> }
>
> GIT_AUTHOR_NAME=$(get_name $GIT_COMMITTER_NAME) &&
> GIT_AUTHOR_EMAIL=$(get_email $GIT_COMMITTER_NAME) &&
> GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME &&
> GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL &&
> export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL &&
> export GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
> ' -- --all &&
> delete_orig_refs &&
> clean_tags &&
> git gc --aggressive
> }
> extract_subdir () {
> git clone --mirror portland-git.git "$1.git" &&
> (
> cd $i.git &&
> git remote rm origin &&
> git filter-branch --subdirectory-filter "portland/$i" \
> --prune-empty -- --all &&
> delete_orig_refs
> )
> }
> fetch_cvs &&
> convert_from_cvs &&
> ( cd portland-git.git && clean_repo ) &&
> for i in dapi-dbus dapi libxdg-vfs xdg-utils
> do
> extract_subdir $i
> done
> END_PORTLAND_GIT_SCRIPT
>
> sh portland-git.sh
--
GPG/PGP KeyID: 463F919C available on http://pgpkeys.mit.edu:11371/
Fingerprint: A9CC 7ABA 698F 028B CC7F D885 78F4 4F3A 463F 919C
http://www.lainconscienciadepablo.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: portland-git-conversion.sh
Type: application/x-shellscript
Size: 3788 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/portland/attachments/20101009/a7a13fab/attachment.bin>
More information about the Portland
mailing list