Prev 5.4. Using SVN Next

5.4.3. Handling tricky situations

Because of limitations in SVN certain tasks are inherently difficult, particularly recovering from mistakes. Although changing the repository directly is nearly always a Really Bad Idea sometimes it cannot be avoided. These guidelines explain what to do in these situations.

Once a change has been committed you cannot un-commit it. You have to reverse the change and check in a new revision with the old code.

Sometimes you might have a number of changes in your working copy which should be committed separately but accidentally get committed all at once with a commit message that's only appropriate to one of the changes. The safe thing to do is revert the inadvertent commits then re-commit them with the right message; editing the repository directly is possible but foolishly dangerous.

Getting an import right is important because it affects the long-term usefulness of the repository. Check import commands particularly carefully before running them!

If you do make a mistake, the solution depends on exactly what went wrong. You might have run the command in the wrong working directory, or you might have used the wrong repository path, etc. The important point is whether the imported files coincide with files in the repository or not.