0

I am using svn on command line on OSX. In my project I want to ignore cache and sessions directories but none of the other topics have helped and I can't see why not.

/my-project/storage/framework/
                             cache/
                             sessions/
                             views/

I want to ignore cache and sessions and their contents from version control. They keep updating or adding new files. I already have some under version control and I don't know how to remove the ones already under control and ignore them all in future.

What I have:

> svn stat
?       storage/framework/cache/96
?       storage/framework/sessions/527212b940937ee8b637e516a5169aa933d03ce0

So far I've tried:

> cd storage/framework
> svn propset svn:ignore cache .
> svn proplist
Properties on '.':
 svn:ignore
>svn propget svn:ignore
cache

>svn status
 M      .
?       cache/96
?       sessions/527212b940937ee8b637e516a5169aa933d03ce0

Should the cache directory not be ignored now? Then I could do the same for sessions and it's contents if it worked.

crwh05
  • 85
  • 8

2 Answers2

0
framework>svn pg svn:ignore -v
Properties on '.':
  svn:ignore
    cache
    sessions

and as result

>svn st
A       framework
?       framework\views

for

>dir /B /S
Z:\WC\framework
Z:\WC\framework\cache
Z:\WC\framework\sessions
Z:\WC\framework\views
Z:\WC\framework\cache\96
Z:\WC\framework\sessions\527212b940937ee8b637e516a5169aa933d03ce0
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • I updated the property svn:ignore to include both and when I run `framework>svn pg svn:ignore -v` I get the same output as you but when I run `svn st` I still get the ? beside the files I want ignored – crwh05 Mar 07 '16 at 19:28
0

I tried different combinations of ignore paths to the files in the folders such as sessions/* and found they didn't work.

This question actually was the answer I partially needed. I was previously unintentionally attempting to ignore the directories when all I needed was to ignore the contents of each of them. So because the directories were already under version control I could not ignore them and their contents. I needed to ignore the contents on their own.

I ended up including a svn:ignore property in both cache and sessions directories to ignore all files with *

Then I removed the already existing files from the repository using svn rm --keep-local cache/* and svn rm --keep-local sessions/* before commiting all the changes and now the contents in both directories are ignored.

Community
  • 1
  • 1
crwh05
  • 85
  • 8