This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

migration to git


We're going to migrate the elfutils project sources from mtn to git.
We liked Monotone, but its development has stagnated, it is not
well-supported for project hosting sites, and it is not very widely
used.  GIT is well-supported and is familiar to more potential contributors.

I've done a test migration, though we are not switching over quite yet.
Please look at the history and see if it seems to be tolerably intact.
I haven't really checked at all except that the tip checkout is complete.

You can get the test repository with:

	git clone git://fedorapeople.org/~roland/eu.git/

Or browse it at:

	http://fedorapeople.org/gitweb?p=roland/public_git/eu.git;a=summary

DO NOT base anything off this git repository!  I will probably re-run
the migration from scratch again for the real migration.  This migration
is up to com.redhat.elfutils rev 08bfa56bdb29649dc9359ffcc6bc498384bebe5b.

Below is the script I used.  If someone can do a better migration,
please do.  You can fetch a whole monotone database file to start with
from http://roland.fedorapeople.org/tmp/elfutils.mtn if you don't have it.

I fought with tailor a good bit a while ago (and a little bit more last
night), and I've given up on doing an ideal migration with all the
branches.  The only thing I figured out how to get working apparently
well is just to track the main branch (com.redhat.elfutils), which folds
in the history of branches that were propagated onto the main branch.

Myself, I don't really care much about migrating the intermediate
history of my side branches.  Since tailor seems to suck at it, I say
"oh well".  For any unmerged branch I want to keep working on, what I'll
do is get it current with the trunk:
	mtn propagate com.redhat.elfutils{,.roland.unwind}
then just save off the patch for the tip of the branch:
	mtn diff -r h:com.redhat.elfutils \
	    	 -r h:com.redhat.elfutils.roland.unwind > unwind.patch
and then go manually turn that one big patch into one big git commit
for a git branch forking from the git trunk.

Even when we do formally switch the trunk and shared branches over to
git, I'll try to keep the ssh-mtn access to the old db for a while
(indefinitely) so you can get at it if you need (and of course if you
pulled lately you already have your own full copy).


Thanks,
Roland

==============

#!/bin/sh -x

# yum install tailor monotone git

# Copy our real mtn db, don't touch it.
cp -f ~/.monotone/db/elfutils.mtn .

rm -rf work com.redhat.elfutils*
mkdir work && (cd work && git init)

topdir=`pwd`
cat > tailor-eu.cf <<EOF
#!
"""
[DEFAULT]
encoding = "UTF8"

[com.redhat.elfutils]
target = git:com.redhat.elfutils
start-revision = INITIAL
root-directory = $topdir
state-file = com.redhat.elfutils-tailor.state
source = monotone:com.redhat.elfutils
patch-name-format = ""
subdir = work
before-commit = remap_author

[monotone:com.redhat.elfutils]
repository = $topdir/elfutils.mtn
module = com.redhat.elfutils

[git:com.redhat.elfutils]
repository = $topdir/.git
branch = master
overwrite-tags = True
"""

def remap_author(context, changeset):
    if changeset.author == 'drepper@redhat.com':
        changeset.author = 'Ulrich Drepper <drepper@redhat.com>'
    elif changeset.author == 'roland@redhat.com':
        changeset.author = 'Roland McGrath <roland@redhat.com>'
    return True
EOF

tailor -c tailor-eu.cf

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]