RKh
RKh

Reputation: 14159

Commit to previous version

I want to know whether it is possible to commit to a previous version. I want to overwrite the previous version. The situation is like this:

I worked on a file and made important modifications that fixed many issues. I committed the changes and SVN reflected version number 10 of the file. The previous version, i.e., the 9th version was written by another programmer and this version is at present in production. I am asked to upload my version. I want to keep the other programmer's version also. I downloaded his version using FileZilla and kept in another folder. I want to overwrite the 9th version with this safe copy, before I upload my copy.

What is the best approach?

Upvotes: 0

Views: 197

Answers (3)

Michael Hackner
Michael Hackner

Reputation: 8645

It sounds like you don’t yet understand the fundamentals of Subversion. I encourage you to read the excellent documentation, located here:

http://svnbook.red-bean.com/

Upvotes: 2

Trevor
Trevor

Reputation: 6689

Revision 9 of that file will always be available from the repository. You can always retrieve it again even after you have committed your new revision.

svn up -r9 path/to/the/file

Upvotes: 2

theunraveler
theunraveler

Reputation: 3284

I would revert your working copy to revision 9, make your changes locally (manually of with diff), then commit. The working copy should then be at revision 11 with both of your changes in place.

Upvotes: 5

Related Questions