[Ffmpeg-devel] SVN dump

Andy Parkins andyparkins
Sat Apr 14 23:09:21 CEST 2007


On Saturday 2007, April 14, Michael Niedermayer wrote:

> could you please provide baptiste with the svn dump of ffmpeg he
> wants

I don't know whether this is of interest to anyone; but I used this 
subversion dump as a source for an import to git.  It was very simple, 
luckily there don't seem to be any branches or tags in the dump.

I've attached my notes on the process.

The most interesting point is the sizes of the repositories,
 compressed subversion dump file     159M
 subverion repository                124M
 packed git repository                19M

That's the entire subversion history in 19M.  That's a much more 
manageable size for anyone who wanted the ability to fork. 

I am sure you're all capable of doing exactly this again; but if anyone 
wants it I can upload a git-bundle somewhere.


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins at gmail.com
-------------- next part --------------
Conversion of FFMPEG subversion to git
======================================

First, the creation of a local subversion repository from the svn dump
of ffmpeg

 $ ls -hs ../ffmpeg-svn-dump-2007-04-14T13\:02+0200.gz 
 159M ../ffmpeg-svn-dump-2007-04-14T13:02+0200.gz
 $ svnadmin create ffmpeg
 $ zcat ffmpeg-svn-dump-2007-04-14T13\:02+0200.gz | svnadmin load ffmpeg
 ------- Committed revision 8731 >>>

Size of subversion repository

 $ du -h
 12K     ./conf
 0       ./dav
 35M     ./db/revprops
 89M     ./db/revs
 0       ./db/transactions
 124M    ./db
 40K     ./hooks
 8.0K    ./locks
 124M    .

Now create a directory to keep the git repository in

 $ git --version
 git version 1.5.1.1.83.g2bfe3
 $ mkdir ffmpeg.git
 $ cd ffmpeg.git

Initialise the subversion link using git-svn, this conversion doesn't
write the subverions meta data to the commit message, and sets the name
of the tracking branch in git to "trunk".

 $ git-svn init --id trunk --no-metadata file:///path/to/ffmpeg/trunk
 Using higher level of URL: file:///path/to/ffmpeg/trunk => file:///path/to/ffmpeg

Now we actually perform the import

 $ git-svn fetch
     ....
         M       libavcodec/cabac.h
 r8731 = bd91ac78c3e089308ae6cc9e23e6735d500a1c8e (git-svn)
 Checking files out...
  100% (569/569) done
 Checked out HEAD:
   file:///path/to/ffmpeg/trunk r8731


Pre-pack size

 $ du -h --max-depth=1 .git
 0       .git/branches
 44K     .git/hooks
 4.0K    .git/info
 1.4M    .git/logs
 324M    .git/objects
 84K     .git/refs
 0       .git/remotes
 916K    .git/svn
 327M    .git

Pack...

 $ git gc --prune
 Generating pack...
 Done counting 44693 objects.
 Deltifying 44693 objects.
  100% (44693/44693) done
 Writing 44693 objects.
  100% (44693/44693) done
 Total 44693 (delta 34823), reused 8181 (delta 0)
 Pack pack-651e5fbf1d9a20bb2ea7f49c501484d1859f0f26 created.
 Removing unused objects 100%...
 Done.

Post pack size

 $ du -h --max-depth=1 .git
 0       .git/branches
 44K     .git/hooks
 8.0K    .git/info
 200K    .git/logs
 18M     .git/objects
 84K     .git/refs
 0       .git/remotes
 916K    .git/svn
 19M     .git

Update to point back at upstream repository

 [svn-remote "svn"]
    url = svn://svn.mplayerhq.hu/ffmpeg
    fetch = trunk:refs/remotes/trunk

This will let you bring your repository up to date with

 $ git-svn fetch
         M       ffmpeg.c
 r8732 = 68d33acb06d8212a5f466e58892f51b421946b0e (trunk)
         M       libavcodec/mjpeg.c
 r8733 = 0505dcf0d7e6bbd6960ec3eb0eed3725613ec1c3 (trunk)
         M       libavcodec/tiffenc.c
         M       tests/libav.regression.ref
         M       tests/regression.sh
 r8734 = 80ca4f744b687304377f3db86978962749a30945 (trunk)

You can run this command whenever you wish to bring the "trunk" branch
up to date with the central repository.




More information about the ffmpeg-devel mailing list