Christian
Christian

Reputation: 2282

How to prevent myself from updating my svn working copy

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.

Upvotes: 5

Views: 1524

Answers (3)

Jaco Briers
Jaco Briers

Reputation: 1715

Go to the .svn directory in the directory that you do not want to update. Rename the entries file to entrieszzz. You won't be able to update or commit anything until you rename it back to entries.

Upvotes: 2

Spacedman
Spacedman

Reputation: 94202

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?

Upvotes: 5

mcabral
mcabral

Reputation: 3558

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..

Upvotes: 5

Related Questions