0
votes

i have a directory structure like this:

home/

- application/

- images/

- temporary/

     scripts/

     js/

     cache/

     uploads/

Now i want to keep my temporary directory and all the sub-directories like (scripts, js, cache, upload....) in the svn, but i want to svn:ignore all the content which is inside directories, so that every time i execute svn status -u, data from temporary directory won't list.

I am using linux. and using following commands:

svn propset svn:ignore "*" .

and then commit -m 'text'

i can see temporary directory listed when executing this command:

svn propget svn:ignore

2
Is there a particular reason why you need this? Normally temporary directories should be created as part of your build process rather than being checked in.Ian Roberts
Its the requirement, these directories must be in svn repo, but i need to ignore the content inside them.Syed ADnan

2 Answers

1
votes

SVN Book must be your best friend for a long time.

Re-read carefully description of svn:ignore property in "Chapter 3. Advanced Topics" - "Properties" - Subversion's Reserved Properties topic and detect 3 your mistakes

If you still will not be able to do it

svn:ignore

If present on a directory, the value is a list of unversioned file patterns to be ignored by svn status and other subcommands.

means:

  • if you want to ignore files in <somedir> then svn:ignore must be defined for <somedir>, for every <somedir>, not just once somewhere
  • files, which you want to see ignored, must not be versioned. Ingone will work only with externals files, not with files already in repo

Thus:

  1. scripts/* + js/* + cache/* + uploads/* files must show status ?, but parent directories - exist already in repo
  2. svn propset svn:ignore "*" . must be executed not in outer space blindly but after cd to every parent dir, 4 times
  3. Executed in unknown dir (/home ???) wrong svn propset svn:ignore "*" . must be found and undo'ed (svn pd ...)
0
votes

If you are using svn version >= 1.7 you may consider the set-depth option, so that files will remain on the svn but you will not have them and not track them in your working copy.

svn update --set-depth='immediates' temporary

to revert use --set-depth='infinity'

and to check your working copies against svn server use both svn list and svn info commands.

Is that what you want ?