R – How to change the files initially imported into an SVN repository

repositorysvntortoisesvnversion control

I have created an SVN repository for project but now realise that the files initially imported are not the most recent.

When I compare the 2 versions of the project with Beyond Compare, the projects do not have the exact same set of files within them. Both project folders have some files which are unique.

I want to now add the correct files to the repository but am not sure of the best approach.

  • I could delete the repository altogether and start afresh. Although I remember this being problematic in the past as the repositories will have the same name
  • I could try to copy the correct files over the exisitng ones and commit. Although there may be old files which are not overwritten, resulting in old files commited to the new project.

What would be the standard SVN approach in this case?

Best Answer

Just use your second approach and replace your existing files with the correct files, then commit.

What do you mean with old files which are not overwritten? If they are not overwritten it just means you didn't replace them because they are already the right files.

So, no problem.

If you're talking about files that have been deleted in the newest version then do a folder/file compare with a tool of your choice (like Total Commander) and let the tool delete the files on one side which are not present on the other. Then commit again.

Important: Commit the two steps separately.