2

I have a versioned file I want to change for local development, but I also want to make sure that I do not accidentally commit those changes to the SVN-Repository. I think in Git there is an option to mark a file with "assume unchanged". Does there exist a similar option in SVN? How do you usually handle this?

Update: Voted to close own question, as I've found it's a duplicate of this one (didn't delete it in case someone searches for "assume-unchanged" and "svn"): SVN: Is there a way to mark a file as "do not commit"?

Community
  • 1
  • 1
borisdiakur
  • 10,387
  • 7
  • 68
  • 100
  • possible duplicate of [SVN: Is there a way to mark a file as "do not commit"?](http://stackoverflow.com/questions/635446/svn-is-there-a-way-to-mark-a-file-as-do-not-commit) – borisdiakur Dec 05 '13 at 09:16

1 Answers1

1

I think that what you are looking for is the svn:ignore property.

Assuming that you're running Windows and that you've installed TortoiseSVN: Right-click the folder that contains the code you have checked out and select "TortoiseSVN" --> "Properties".

This will bring up a new dialog where you can add or edit the properties currently associated with your repository. Add or edit the svn:ignore property and adjust it so that it references the file you want to exclude from accidental commits.

Arenhag
  • 76
  • 3
  • 1
    Thanks. I know I can ignore files. I want the file to be versioned though, but I do not want to commit certain changes for the duration of a development session, if you know what I mean. In Git you can ignore files, but you can also mark them with the "assume-unchanged" flag. https://help.github.com/articles/ignoring-files#ignoring-versioned-files I will update my question to make it clear. – borisdiakur Dec 04 '13 at 14:27
  • Ah, well in that case you could add it to an ignore list in subversion. From the commit dialog in TortoiseSVN, right-click the files that's listed as changed and select "Add to ignore list" and select a pattern that suits your situation. NB: this will only be honored on your own machine. Your colleagues machines won't have this restriction. – Arenhag Dec 04 '13 at 14:58
  • I believe that adding the file pattern to a local ignore list will only have an effect on files which are not yet versioned. By the way, I use CornerStone on OSX. And I suppose that TurtoiseSVN will not enable the "Add to ignore list" option for files already versioned. Have you tried to ignore files which are already versioned? – borisdiakur Dec 04 '13 at 16:37
  • For files that are already versioned you can add them to a so called change list that in TortoiseSVN is called "ignore-on-commit". That will result in the file not being checked when you bring up the commit dialog, where as all other files are checked and thus prepared to be committed. – Arenhag Dec 05 '13 at 08:43
  • Too bad I do not use TurtoiseSVN : [ – borisdiakur Dec 05 '13 at 09:15
  • Turns out that what you're looking for in your SVN client has been requested for almost four years. http://zennaware.uservoice.com/forums/6726-cornerstone/suggestions/85675-add-changelist-support Perhaps time to turn to command line? – Arenhag Dec 05 '13 at 21:00