If you getting merge conflicts during the unshelve or then merging trunk, you'll have to manually edit the files to get them in a good state again, then call
bzr resolve
If it doesn't autoresolve:
bzr resolve <filename>
Compile again to make sure that you haven't made any mistakes with the merge, then commit.
You get diverged branches if somebody else pushed to the online version of the branch. You can rescue your changes with:
bzr uncommit
bzr shelve
Then pull the changes:
bzr pull lp:~widelands-dev/widelands/filesystem-errors
Then retrieve the shelved changes:
bzr unshelve
If you getting merge conflicts during the unshelve or then merging trunk, you'll have to manually edit the files to get them in a good state again, then call
bzr resolve
If it doesn't autoresolve:
bzr resolve <filename>
Compile again to make sure that you haven't made any mistakes with the merge, then commit.