Pregunta

The .settings folder and the .project file are currently under version control. I need to add the svn:ignore property on them. Here is how I've always done it when we were only few developers:

  1. Backup them temporary locally
  2. Delete them locally and commit (or delete them remotely and update)
  3. Re-add them locally from the backup (step #1)
  4. Add the svn:ignore property and commit

The problem is that the other developers will have to backup their files too before updating, since their local files will be deleted when updating. Any other less restrictive solution, or do I really have to send a "please backup before updating!" email?

¿Fue útil?

Solución

You should use the svn rm --keep-local instead.

If you are on Unix, you can test this:

find . -name .project -exec sh -c 'svn info "{}"' \; -a \
       -execdir bash -c 'svn -q propset svn:ignore -F <((svn propget svn:ignore;\
                    echo .project) | sort -u) .' \; -a \
       -execdir svn delete --keep-local {} \;
  1. search .project file and check if it's versioned.
  2. retrieve properties and add .project in the local directory. sort -u prevents from duplicates
  3. If you want to ask for confirmation, use --okdir instead

Note: you could commit only at the end since it's the same operation (i.e. "cleaning properties").

FWIW don't lose hope, svn 1.8 contains inherited Properties (http://subversion.apache.org/docs/release-notes/1.8.html#iprops)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top