6

I am using the svn:ignore property for the first time, so I may be misunderstanding something.

I am working on an iOS application. I have an Xcode project and I want to ignore the xcuserdata folder. Using the Mac Terminal application, I go to the root of my svn repository and try to ignore the folder using:

svn propset svn:ignore path/to/my/folder/MyProject.xcodeproj/xcuserdata .

If I check the svn:ignore property using:

svn propedit svn:ignore .

I see:

path/to/my/folder/MyProject.xcodeproj/xcuserdatata

I have committed and updated, but I do an svn status, I still see the folder with a ? mark beside it. Does anyone know what I'm doing wrong? I am using svn version 1.6.17 (r1128011).


Edited to add that my question seems similar to this one: SVN just won't ignore a folder, despite propset svn:ignore, but in my case none of the files in the folder I want to ignore seem to be added to svn, nor is the folder that I want to ignore added to svn.

Community
  • 1
  • 1
Darren
  • 10,091
  • 18
  • 65
  • 108

2 Answers2

11

I think you want:

svn propset svn:ignore xcuserdata path/to/my/folder/MyProject.xcodeproj

ie you want to ignore xcuserdata at the path.

MattR
  • 6,908
  • 2
  • 21
  • 30
  • That worked! I don't understand what the difference between what you wrote and what I wrote though. I was ignoring the folder path/to/my/folder/MyProject.xcodeproj/xcuserdata at the path ".". It seems like the same thing to me. – Darren Jul 27 '12 at 16:24
  • 1
    One's a value, one's a path, but yes I know what you mean - why can't the value be a path? :-) – MattR Jul 27 '12 at 16:33
  • 1
    I'd like to ignore *ALL* `xcuserdata`-s anywhere in the hierarchy. (Multiple users generate multiple files, as do multiple projects in the same directory.) Is there no way to tell svn "everywhere from `trunk/` on down, just ignore anything named `xcuserdata` ? (Bonus points if you can explain how to ignore either files or directories.) Thanks! – Olie Sep 01 '15 at 17:34
1

There are a couple of ways to fix this globally. One is to edit subversion's config file located at ~/.subversion/config. Look for the line for global-ignores, uncomment it and change it to xcuserdata, like this

global-ignores = xcuserdata

Save that and svn status will no longer report xcuserdata folders. That makes the change on your local machine and it will only affect you. To make it on the repository itself so that it affects everybody, navigate to the root of your source tree and use the global-ignores property, like this

svn propset svn:global-ignores xcuserdata .

Then commit the change to make it active.

John Stephen
  • 7,625
  • 2
  • 31
  • 45