Re: SVN - Reverting to an Earlier Version

Todd Whiteman <[email protected]> Tue, 04 Aug 2009 16:07:38 -0700
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
Eric Robertson wrote:
> I've been working on some CGI Perl files for a client in anticipation of
> some changes that she wanted that affected one file in particular. In
> working on this I had noticed some things that weren't quite right with some
> of the associated files and had changed them and committed these to my SVN
> repository. The client has come back and asked that I make another change
> first so I committed the changes in that file so that I'd not lose them. I
> now want to change my working folder back to an earlier version of that file
> without changing any of the others.
> 
> I'm very new to subvention and its concepts and have studied the SVN manual
> but didn't see any reference dealing with this sort of situation. It seems
> that most of the commands I might have used deal with whole folders. I
> eventually used "svn merge -r HEAD:n .....", where n was the revision number
> for the version of the file I wanted and restricted the merge to the file I
> wanted to change. Was that the correct way of dealing with this situation?
> 
> Once I've got these changes made and tested I'll commit them. I then want to
> introduce the changes I had made previously to that one file. Is merge again
> the best command to use?
> 
> I'm working alone on these files so don't have the complication of others
> making changes to them.

Yes, you have made the correct approach to reverting to a previous 
version (using svn merge -r ...).

Now the thing to note is that your still working at the latest svn 
version, though you've now got local changes (a rolled-back commit). All 
your other unmodified svn files are still at the latest version, whilst 
the modified files should contain your latest changes minus the changes 
made from the one (or more) commits you reversed.

When you've changed things to how you like, you can then simply commit 
the files (as you normally would for a change). The new committed files 
will now be the latest version (i.e. the HEAD).

Cheers,
Todd
_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss