Merging
There is multiple ways to do merging between branches. I will describe 2 ways
Using svnmerge
Svnmerge is a tool that tracks merges by adding properties to the HEAD of branches. It is easy to use and remove the potential of merging errors and repeatitive redundant merges. However it is a command line only.
Read the svnmerge instructions
Using tortoisesvn
TortoiseSVN support merging ranges of revision to a workspace. It is fully graphical and if using a 3 way merge tool, gives the greatest usability. However it does not track merges so you have to be disciplined to describe merges commit in commit comments and use svn log before starting merging to pick only new revisions.
Read the TortoisSVN Merging Chapter
Recommendations
- Always start with an unmodified target workspace. That way if something goes wrong you can revert to clean slate easily without losing changes.
Server repository corruption recovery
Codehaus had a very bad case of file system corruption that wiped out both the subversion repositories and their most recent backup. On May 21, they had to restore to the last good backup from May 9. This unfortunately means that all developers workspaces are completely and unrevocably unusable.
Commit changes from a workspace originating from a revision that is no longer in the repository
| DO NOT USE YOUR WORKSPACES ANYMORE. They contains revisions that are no longer in the repository but may be recreated again as people commit. As these new revisions will be completely different than your local revisions, you may get strange results, lost your work or potentially corrupt the branch HEAD revision. |
Follow these instructions to merge your changes into the new repository HEAD:
- Export your old workspace
- Checkout a brand new workspace
- Manually diff and merge your changes of your exported workspace into the new workspace
- Add new files
- Delete missing files
- Modifications should be transparently picked up
- Commit the new workspace
- Delete your old workspace.