1

大きなファイルを含む大きな svn リポジトリがあります。私はそれをgitに変換しています。しかし、Apache ログに次のエラーがあります。

「致命的: メモリ不足ですか? mmap に失敗しました: メモリを割り当てることができません」

私が使う:

git バージョン 1.7.2.5
gitweb バージョン 1.7.2.5

git は NO_CURL=1 NO_MMAP=1 でコンパイルされます

このガイドを使用して git と gitweb をインストールします: https://github.com/tmacam/private-git-on-dreamhost

そしてサーバーで実行します:

git config --global pack.windowMemory "100m"

git config --global pack.SizeLimit "100m"

git config --global pack.threads "1"

git config --global pack.packSizeLimit "100m"

そして、サーバーリポジトリを作成するときに使用します:

git config pack.windowMemory "100m"

git config pack.SizeLimit "100m"

git config pack.threads "1"

git config pack.packSizeLimit "100m"

私のコンピューターでは、次の変換スクリプトを使用します。

$1=~/git-repo
$2=file:///home/user/svn/data/Repo
$3=http://mygit.server.com/repo.git

rm -Rf $1
mkdir $1
cd $1
/var/lib/gems/1.8/bin/svn2git $2 --rootistrunk --verbose

rm -Rf ~/temp   
git svn clone $2 --no-metadata -A ~/authors.txt ~/temp   
cd ~/temp
git svn show-ignore >> $1/.gitignore
rm -Rf ~/temp
cd $1

echo "Add remote"
cd $1
/usr/bin/git remote add origin $3

echo "Add git ignore"
git add .gitignore
git commit -m 'Convert svn:ignore properties to .gitignore.'

echo "Repack"
git config --global pack.windowMemory "100m"
git config --global pack.SizeLimit "100m"
git config --global pack.threads "1"
git config --global pack.packSizeLimit "100m"

git config pack.windowMemory "100m"
git config pack.SizeLimit "100m"
git config pack.threads "1"
git config pack.packSizeLimit "100m"

git repack -a -d 
git gc

echo "Up server"
cd $1
/usr/bin/git push origin master 

手伝って頂けますか?

4

0 に答える 0