$ darcs get +DBMigration DBMigration.copy
Unapplicable patch:
Mon Jul 23 14:53:41 EDT 2007 Yohanes Santoso
* added sisc-1.16.6 external package
darcs: ./src/com/example/DBMigration/Frob1.class: openBinaryFile: does not exist (No such file or directory)
I checked the changelog and found that the second patch on the tree recorded modifications to files that were never added to the repository:
$ darcs changes -s | tail
Mon Jul 23 14:53:41 EDT 2007 Yohanes Santoso
* added sisc-1.16.6 external package
A ./external_package/
A ./external_package/sisc-1.16.6.zip
M ./src/com/example/DBMigration/Frob1.class
M ./src/com/example/DBMigration/Migrate.class
M ./src/com/example/DBMigration/TemplateRepository.class
Mon Jul 23 10:19:02 EDT 2007 Yohanes Santoso
* initial import
A ./src/
A ./src/com/
A ./src/com/example/
A ./src/com/example/DBMigration/
A ./src/com/example/DBMigration/Frob1.java
A ./src/com/example/DBMigration/Migrate.java
A ./src/com/example/DBMigration/TemplateRepository.java
The imported files were the java source files, but somehow that patch recorded modifications to the class files which were never imported.
I tried many ways to fix this so I can get my branch, but found modifying the patches repository directly was the only one that worked.
Patch files are stored in _darcs/patches directory. They are gzip-ed text files. Each represent a changeset (darcs record). I located all the files that contain references to these .class files, and edited them out. It worked!