Assume I have a working copy of a project versioned with svn. For a particular reason I want to keep a particular revision x of that project as my working copy. But sometimes I'm clumsy and I accidentally do an svn update to the latest revision y>x. Is there an easy way, to prevent svn updates on a working copy, like disabling the update command or something? Thanks.
A Subversion working copy is your own private working area, which looks like any other ordinary directory on your system. It contains a COPY of those files which you will have been editing on the website.
svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up-to-date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the --revision option.
Use the command line svn client or your favorite SVN client (TortoiseSVN, for example). Your local copy of the project is called a working copy in Subversion and you get it by issuing the command svn checkout <URL> where <URL> is a repository URL.
Subversion is pretty smart about updating and never just overwrites files that have local changes with copies from the repository. The most important thing to take away from this section is: If you collaborate with others on one repository, remember to update your working copy regularly.
If you checkout with 'svn export' rather than 'svn checkout' you'll get a copy without all the .svn info. That will stop you doing svn update since it's not a working copy at all.
It will also stop you doing "svn anything" on that tree (at least not without some gymnastics to make it a valid svn checkout)
Is that any good?
You could make a branch. More info on branching and merging can be find here.
With a branch you can work all you want and doing svn-up
will do anything since no one should be commiting to yout branch. Then, after all the work is done you just merge
your work with the trunk
This should be best over exporting all the code from version control, since well, you just lose version control..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With