lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Migration to git


From: Greg Chicares
Subject: Re: [lmi] Migration to git
Date: Sun, 22 May 2016 01:00:56 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0

On 2016-05-20 20:12, Vadim Zeitlin wrote:
> On Fri, 20 May 2016 18:43:57 +0000 Greg Chicares <address@hidden> wrote:
[...already migrated...]
> GC> Then I won't waste my time poorly reproducing what you've already done.
> 
>  We need to reproduce it to get rid of git-svn metadata. Should I redo it
> or will you?

I'm doing it myself. It's valuable practice.

# Make a local copy of the svn repo to minimize load on savannah

/home/greg/repository[0]$rsync -acvHS rsync://svn.savannah.nongnu.org/svn/lmi/ 
lmi.repo/
sent 251889 bytes  received 199981323 bytes  572913.34 bytes/sec
total size is 199015467  speedup is 0.99

# Verify

/home/greg/repository[0]$svnadmin verify lmi.repo 2>&1 | sed -e'/\* Verified 
revision [0-9]*\./d'

# Clone from svn: lmi trunk only

/home/greg/repository[0]$cat authors.txt
(no author) = cvs_to_svn_migration <address@hidden>
chicares = Gregory W. Chicares <address@hidden>
etarassov = Evgeniy Tarassov <address@hidden>
rericksberg = rericksberg <address@hidden>
vslavik = Vaclav Slavik <address@hidden>
wboutin = wboutin <address@hidden>
zeitlin = Vadim Zeitlin <address@hidden>

/home/greg/repository[0]$time git svn clone file://$HOME/repository/lmi.repo \
  --authors-file=authors.txt --no-metadata --trunk=lmi/trunk ./transitional/lmi
...
r6612 = a006f83870b33059c51e5282cdbc695a35bcc90d (refs/remotes/trunk)
Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 9601, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (9600/9600), done.
Writing objects: 100% (9601/9601), done.
Total 9601 (delta 7617), reused 0 (delta 0)
Checked out HEAD:
  file:///home/greg/repository/lmi.repo/lmi/trunk r6612
creating empty directory: third_party/boostfs
git svn clone file://$HOME/repository/lmi.repo --authors-file=authors.txt
     347.67s user 2156.86s system 94% cpu 44:22.52 total

# Create a local bare repository...

/home/greg/repository[0]$git init --bare ./temporary-bare/lmi
Initialized empty Git repository in /home/greg/repository/temporary-bare/lmi/
/home/greg/repository[0]$cd ./temporary-bare/lmi
/home/greg/repository/temporary-bare/lmi[0]$git symbolic-ref HEAD 
refs/heads/trunk

# ...and push to it...

/home/greg/repository/temporary-bare/lmi[0]$cd ../../transitional/lmi
/home/greg/repository/transitional/lmi[0]$git remote add bare 
$HOME/repository/temporary-bare/lmi
/home/greg/repository/transitional/lmi[0]$git config remote.bare.push 
'refs/remotes/*:refs/heads/*'
/home/greg/repository/transitional/lmi[0]$git push bare
Counting objects: 32422, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (7334/7334), done.
Writing objects: 100% (32422/32422), 11.68 MiB | 18.87 MiB/s, done.
Total 32422 (delta 25916), reused 31555 (delta 25049)
To /home/greg/repository/temporary-bare/lmi
 * [new branch]      trunk -> trunk

/home/greg/repository/transitional/lmi[0]$cd ../../temporary-bare/lmi
/home/greg/repository/temporary-bare/lmi[0]$git branch -m trunk master

# ...then clone from there to make sure everything works...

/home/greg/repository/temporary-bare/lmi[0]$cd ../..
/home/greg/repository[0]$mkdir final
/home/greg/repository[0]$cd final
/home/greg/repository/final[0]$git clone 
file://$HOME/repository/temporary-bare/lmi
Cloning into 'lmi'...
remote: Counting objects: 32422, done.
remote: Compressing objects: 100% (6467/6467), done.
remote: Total 32422 (delta 25916), reused 32422 (delta 25916)
Receiving objects: 100% (32422/32422), 11.68 MiB, done.
Resolving deltas: 100% (25916/25916), done.

# Compare to clone of Vadim's repository

/home/greg/repository[0]$du -sb final/lmi vadim/lmi
21394883        final/lmi
21585360        vadim/lmi

/home/greg/repository/final[0]$cd ..
/home/greg/repository[0]$meld final/lmi vadim/lmi &

Differences noted...
in .git:
  'master' and 'HEAD' sha1sums differ, as expected
  config: only 'url' differs
  I have only one element in packed-refs, vs. several
source files differ only because I have svn r6612 vs. r6608

It looks like this is about ready to push to savannah, so let me ask for
advice at this point.

- Are there any other reasonableness tests I should perform first?

- Should I run 'git-gc' before pushing?

- How exactly do I push this? Poking through the instructions here:
  http://savannah.gnu.org/maintenance/UsingGit/
I think the answer is:

$ login='chicares'
$ project='lmi'
$ git push --all -v address@hidden:/srv/git/${project}.git

Do I have to change the 'url' in .git/config first, to point to
savannah?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]