0

I am working with eclipse subversion plugin, and made some local changes to crucial files, which I don't wan't to check in. I'm looking for a way to "lock" (I know that the lock term means something else in svn...) these local files and disable checking them in, so that I won't accidentally check them in.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Elist
  • 5,313
  • 3
  • 35
  • 73
  • possible duplicate of [How do I avoid checking in local changes to the SVN repository?](http://stackoverflow.com/questions/1732366/how-do-i-avoid-checking-in-local-changes-to-the-svn-repository) – Ben Reser Jan 29 '14 at 18:14

2 Answers2

1

Maybe you can just ignore them:

Team --> add to svn:ignore

if necessary you can do this via the svn command line. This way you might add a pattern to svn ignore

svn pe svn:ignore .

then you can fill in something like:

*.d

NOTE that svn:ignore is different for each subfolder (hence the "." in the svn command)

Chris Maes
  • 35,025
  • 12
  • 111
  • 136
  • 1
    if you ignore them; they will not appear in your "team synchronizing" tab; so you won't check them in accidently... I used this method for quite some time. – Chris Maes Jan 29 '14 at 09:54
1

The answer largely depends on if the file is already being tracked (versioned) by Subversion or not.

Not Versioned

Setting up an ignore via one of the several methods we have of ignoring files will do what you want. If you're using 1.8 we also have svn:global-ignores which supports inheritance (so if you want to say ignore all files with the .o extension you could just set a svn:global-ignores with *.o as a pattern.)

Versioned

If the file is already in the repository and is versioned then ignore won't help you since versioned files are not ignored by any configuration you do. One alternative, as mentioned in the answer to this question "How do I avoid checking in local changes to the SVN repository?", is to use a changelist and add the file to the changelist.

A better option might be to restructure your setup to not require making local changes to versioned files. A common pattern you will see is configuration files where the committed file is a template, developers then copy the template into another name that is used and customize it.

Community
  • 1
  • 1
Ben Reser
  • 5,695
  • 1
  • 21
  • 29