SVNに取り込む方法を参考にしていますが、エラーが出ており対応方法がわかっていません。
やってみた内容を記載しているので、「違うよ!」という点あれば是非是非アドバイスをいただきたいです。
やりたいこと
- SVNで過去に管理してたファイル(ローカル)をSVNに取り込みGitへエクスポートしたい。
- 管理ファイル全体ではなく、1つのリポジトリのみ
ファイルの内容
ファイルは2つ
外注先から納品されたファイルのため全て保存する方針
- 20GB ほどのdumpファイル
- 15BG ほどのソースと思われるファイル
作業環境
- PCはMACを使用しています
- ストレージに保存されていたファイルを使用
- GituHub環境はすでに使用中
- SVNサーバ環境は構築していない
- SVNはローカルにインストール済
$ svn --version svn, version 1.9.4 (r1740329) compiled Nov 6 2017, 18:06:35 on x86_64-apple-darwin16.1.0 Copyright (C) 2016 The Apache Software Foundation. This software consists of contributions made by many people; see the NOTICE file for more information. Subversion is open source software, see http://subversion.apache.org/ The following repository access (RA) modules are available: * ra_svn : Module for accessing a repository using the svn network protocol. - handles 'svn' scheme * ra_local : Module for accessing a repository on local disk. - handles 'file' scheme * ra_serf : Module for accessing a repository via WebDAV protocol using serf. - using serf 1.3.8 (compiled with 1.3.8) - handles 'http' scheme - handles 'https' scheme The following authentication credential caches are available: * Plaintext cache in /Users/user/.subversion * GPG-Agent * Mac OS X Keychain
作業フォルダ構成
svn(フォルダ)
┗ svn.dump
┗ tar zxvf ファイル名.tar.gz
参考にする記事
以下記事を参考に作業を試みています
https://qiita.com/yakumo/items/b8531f44671d6781a2d3
↓記事内のこちらは無くても問題なさそうなのでやっていません
※Subversionアカウント名->gitメールアドレスの読み替えファイルを作る
作業記録
ストレージに保存されていたファイル(過去にSVNで管理していた)をローカルへダウンロード
ファイルの解凍
tar zxvf ファイル名.tar.gz
作業フォルダ構成
svn(フォルダ)
┗ svn.dump
┗ repos (フォルダ)
subversionリポジトリ作成
svnadmin create svnimport
作業フォルダ構成
svn(フォルダ)
┗ svn.dump
┗ repos (フォルダ)
┗ svnimport (フォルダ)
ダンプファイルのロード
svnadmin load svnimport/ < svn.dump
$ svnadmin load svnimport/ < svn.dump <<< Started new transaction, based on original revision 1 * editing path : ProjectName ... done. * editing path : ProjectName/branches ... done. * editing path : ProjectName/tags ... done. * editing path : ProjectName/trunk ... done. * editing path : CourseEditor ... done. * editing path : CourseEditor/Assets ... done. * editing path : CourseEditor/Assets/Project Course Editor ... done. * editing path : CourseEditor/Assets/Project Course Editor/Plugins ... done. * editing path : CourseEditor/Assets/Project Course Editor/Plugins/PlayerPrefs.cs ... done. * editing path : CourseEditor/Assets/Project Course Editor/Plugins/PlayerPrefs.cs.meta ... done. * editing path : CourseEditor/Assets/Project Course Editor/Plugins.meta ... done. * editing path : CourseEditor/Assets/Project Course Editor/Scene ... done. ~~~~~長いため省略~~~~~ ------- Committed revision 7596 >>> <<< Started new transaction, based on original revision 7597 * editing path : ProjectName/trunk/CheckSheet/Changes_V1_2(内部用資料).xlsx ... done. ------- Committed revision 7597 >>> <<< Started new transaction, based on original revision 7598 * editing path : ProjectName/trunk/Patch/Banner/ProjectNam_JP.bsf ... done. ------- Committed revision 7598 >>> <<< Started new transaction, based on original revision 7599 * editing path : ProjectNam/trunk/ProjectNam/Sources/GameObjects/BOSS/BossTaskCheck.cpp ... done. ------- Committed revision 7599 >>>
svnimportリポジトリにファイルが追加されたことを確認
ローカルにSubversionサーバーを立てる
参考に記事に書いてあった内容をそのまま実行
svnserve -d -R --foreground --root svnimport/
動いているか確認
$ ps aux|grep svn user 46101 0.0 0.1 2444560 8668 s000 S+ 12:31PM 0:00.04 /Library/Developer/CommandLineTools/usr/bin/svnserve -d -R --foreground --root svnimport/ user 94027 0.0 0.0 2450212 1740 s001 R+ 3:48PM 0:00.00 grep svn
新規ターミナルを開く
作業フォルダ構成
svn(フォルダ)
┗ svn.dump
┗ repos (フォルダ)
┗ svnimport (フォルダ)
gitリポジトリ生成
$ git svn init -s --prefix=svn/ svn://localhost/ svngitexport/ Initialized empty Git repository in /Users/user/Documents/svn-gitexport/.git/
作業フォルダ構成
svn(フォルダ)
┗ svn.dump
┗ repos (フォルダ)
┗ svnimport (フォルダ)
┗ svngitexport (フォルダ)
作成したリポジトリに移動
$ cd svngitexport
Subversionリポジトリ内容をgitに変換(取込)
git svn fetch
この時点でsvngitexportリポジトリを確認しましたが、ファイルは見当たりません
.gitフォルダのみ作成されています
git clone を試す
git svn clone svn://localhost/
r3000 = 13557ea4bfcf6a2fb0ea5459632b85cee3c0e736 (refs/remotes/git-svn) Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. error: The last gc run reported the following. Please correct the root cause and remove .git/gc.log. Automatic cleanup will not be performed until the file is removed. warning: There are too many unreachable loose objects; run 'git prune' to remove them. gc --auto: command returned error: 255
絶対パスに変更してgit svn clone
git svn clone file:///home/user/repos
ファイル数が多いことでのエラー?
Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. error: The last gc run reported the following. Please correct the root cause and remove .git/gc.log. Automatic cleanup will not be performed until the file is removed. warning: There are too many unreachable loose objects; run 'git prune' to remove them. gc --auto: command returned error: 255
この記事を参考に対応
https://takanosho.wordpress.com/2016/01/21/fix-running-git-gc-on-every-merge/
$ git gc –-aggressive usage: git gc [<options>] -q, --quiet suppress progress reporting --prune[=<date>] prune unreferenced objects --aggressive be more thorough (increased runtime) --auto enable auto-gc mode --force force running gc even if there may be another gc running
$ git gc Nothing new to pack.
できていない
回答1件
あなたの回答
tips
プレビュー