移行を何度も行うときに毎回、create-disk-imageしたくない
- 以前SVNからStash(Git)へ移行するやり方を書きました。
- リブートするとマウントが解除されますので再開するときはマウントするだけにしたいです。
- ツールのREADMEを見ると、mount-disk-image (OS X only)というオプションが書いてあるのですが、実際には実装されていないようです。_| ̄|○
どうやってマウントしているのか調べる
- ソースを見るのが手っ取り早いです。
def apply(cmd: Cmd, options: Array[String], arguments: Array[String]) = { val size = arguments(0) + "g" val imageName = arguments(1) val imagePath = /(homeDir, imageName + ".sparseimage") // Append suffix to stop wrong image type being created val mountPath = /(homeDir, imageName) run((Seq("hdiutil", "create", "-size", size, imagePath, "-type", "SPARSE", "-fs", "HFS+", "-fsargs", "-s", "-volname", imageName) #&& Seq("hdiutil", "attach", imagePath, "-mountpoint", mountPath)), "The disk image was created successfully and mounted as: " + mountPath, "The disk image could not be created. Check if an image already exists at " + imagePath) }
hdutil
というのでcreateしてattachしているようです。
マウントしてみる
$ hdiutil attach ~/GitMigration.sparseimage -mountpoint ~/GitMigration
/dev/disk2 GUID_partition_scheme
/dev/disk2s1 EFI
/dev/disk2s2 Apple_HFS /Users/username/GitMigration
- なんか出来たようです。
- verifyして
You appear to be running on a case-insensitive file-system. This is unsupported, and can result in data loss.
が出ないことを確認します。
$ java -jar svn-migration-scripts.jar verify
これで移行が再開出来ます。