Monday, December 21, 2009

Convert bin/cue files to .iso on OS X

This is documented a couple places in much detail.
I just needed a CD image convert to ISO format (that's ISO9660)
so I could mount it in VMware Fusion.
Warning: command lines follow.
  1. Get BinChunker (bchunk) to convert bin/cue to iso. If you don't have a compiler, you can get it prebuilt here: BinChunker for OS X. I was trusting.. it works.
    (If you have macports installed, then you can just do 'sudo port install bchunk').
  2. run bchunk. I will assume you specify full path here or have it on your path:
    bchunk -v image.bin image.cue isoFileName
  3. Done. Mount it in vmware, Virtualbox, or just open the iso file if you want to look at the files (double-click in Finder).
Above is all I need to remember.
Credit to these posts, which go into more depth and alternatives.
Along the way I found some other things.
  • 'drutil burn' says it can burn bin/cue files; see the man page.
  • Burn can also burn bin/cue files, ISO's, mp3's or audios with CD-Text, and more.
    Selectable compression for conversion of videos to DVD format (mp2)--this might let me get more video on a disc?


Wednesday, December 16, 2009

Mercurial error-- hg ... "abort: cannot follow nonexistent file: "

There is a simple solution near the end..

I don't know much about Mercurial, except that it's a free revision control system and included with NetBeans. I was playing with the GUI builder and didn't want to pollute a subversion-controlled project, but did want to be able to revert back if necessary, and somewhere saw that Mercurial didn't need a server.

Anyway, it was working fine, then I went away from my work for a week or so,
had some more stuff that needed to be checked in before I could test moving part of a module to another project.

.. but on trying to commit my changes in NetBeans, I got an error dialog with instructions to see the output window, which contained the arguments to hg plus the message
abort: cannot follow nonexistent file: src/com/foo/frop/ickyGui.java
followed by one of the project files I was trying to check in.

I knew hg put its stuff in a tree somewhere, found it in NetBeansProjects/MyProject/.hg.
There is a file here for every src file in my project (filenames minorly encoded), plus a couple metadata files per directory. When I looked for the file hg complained about, it wasn't there.
Yet hg though it was checked in. How to convince it otherwise?

I didn't see any commands in the menus that looked promising,
google's first page of results were just statements that 'Mercurial is unfriendly'.
I really didn't want to spend a lot of time on this. Worst case I could create a new project and check it all in again. But I know how to mess with things which is generally the first step in reverse-engineering, so..

SOLUTION

I moved the files out of the way,
and then Mercurial said they were gone.
I committed this change.
I moved the files back,
Mercurial said they were new.
I added them.

And I remembered something I might have done--I restored a MacBook from TimeMachine backup as a way to migrate to another machine. Possibly that Mercurial file was one of the last, or somehow that file feel in the cracks one of the times I aborted backups.

Ideally, hg or netbeans would provide some graceful recovery.