Another developer on the project moved a versioned folder without properly doing it via SVN. So SVN shows a directory tree deleted, and another one created, and doesn’t show that one was simply the result of a rename of the other. This screws with peg revisions, difs, and source history.
Is there any way to fix this, for example via svndump?
Basically, to mark trunk/b as a copy-from trunk/a.
You can hand-edit the svndump file for that one commit to drop the content of all the additions and change it to a single addition of trunk/a with a copy-from and copy-from-rev. Then you would need to dump all previous revisions and all following revisions, then load all the revisions in order into a new repository and replace your repository. Then you need everyone to checkout from the new repository and trash their old working copies.
You can avoid the hand-editing bit, assuming the bad rename was the only thing in that commit. Suppose the bad revision is $REV. Dump revisions 0 up to (but not including) $REV. Load those into a new repository. Checkout from the new repository, do the correct rename, and commit. Do an incremental dump of $REV+1 through HEAD in the old repository and load into the new repository.