1

Imagine I have the following repo history

1000 -- 1001 -- 1002

In revision number 1001 I added a few files in the subdirectories and commited it to 1002. But what actually I had to do was to remove all files from some of these subdirectories and then add new files and then commit it to revision number 1002.

As humans make mistake :) and so I was no exception. Now 1002 has all the new files and old files, and it will be very very hard if I have to remove files from 1002, as it will be a mix of all files. Is there a way I can easily do this in svn?

Thanks

0xhacker
  • 1,091
  • 2
  • 14
  • 26

1 Answers1

1

Start with a clean working directory and go back to the revision before adding the new files:

svn up -r 1001 .

Now, you can remove all files from the sub-directories. The files added in rev 1002 are not affected, because they do not exist in the revision of the working copy.

svn rm foo/* bar/*

Use svn up to update the working copy to the latest version. The files added in rev 1002 appear. Use svn commit to commit the files, that have been marked for removal previously:

svn up
svn commit
nosid
  • 48,932
  • 13
  • 112
  • 139