this may be fine for a smallish/newish repository but is probably not what you want if you have a large/old repository in which some subdirectories may have independent svn:ignore properties that you do not wish to overwrite. On earlier versions (and on later versions), you can still use the approach indicated in the original answer below however, be aware that this assumes that you are okay with replacing/overwriting the svn:ignore property on each and every subdirectory. Since 1.8, the best way to achieve what you would like is to invoke the following command (credit goes to TManhente): svn propset svn:global-ignores '*.o'. At the very least I'll submit it as an issue/feature-request.The original answer provided below was given prior to Subversion v1.8 which introduced a way to set the default repository level ignore (called svn:global-ignores) without overriding/replacing the svn:ignore property on the root directory and every single subdirectory. I may try to patch SVN to change this, but I don't know how clean the implementation of properties is in the SVN source. This is probably what I'll end up having to do, and then doing an auto-prop for new directories added later.This behavior is completely broken in my opinion. Then, once the directory structure has been marked as added, you can use svn propset -recursive. ![]() This should "force" the ignore for you (if you don't need them long-term, remove the entries you added when you're finished). Quote:Originally posted by UpstateAL:The issue you're facing is that you need to set a property on a directory which can't have properties set on it yet, because it's not a working copy.In your scenario, I'd suggest adding the filenames/patterns to ~/.subversion/config's global-ignores line. Or, if feasible, just create a separate checkout with the appropriate directory structure, commit it, then checkout the folder structure on top of your existing folder structure. Then, once the directory structure has been marked as added, you can use svn propset -recursive.You also could do the svn add, then before the commit svn revert the files you don't want added to the repository. ![]() And since most shells expand the *, it'll see an explicit list of files/directories. If you tell Subversion to do something that runs counter to an svn:ignore rule, it assumes you know what you're doing and does as commanded. And when you explicitly ask svn to add a file, it thinks you're asking it to add the file regardless of any ignore settings.That's what I remember, anyway, but it's been a year or so since I last touched svn. When you do "svn add *", the shell is responsible for expanding the * out to the directory contents, so all that svn sees is "svn add foo bar baz". With the above command Subversion will ignore all files with extension suo in the. Do not forget the final dot, it means that the target folder is the current folder. If you do 'svn add *' in a directory, it will add all the files you want to exclude._. For example, to ignore suo files in the solution’s folder, you would perform following command in the folder of the solution: TargetFolder>svn propset svn:ignore. Quote:Originally posted by Catfish:quote:Originally posted by Bhelyer:quote:Originally posted by norton_I:One other thing to watch out for, svn:ignore does not keep files from being explicitly added.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |