When I try to commit my project to svn I get the following issue
svn: '/var/www/sites/blabla/425/file.png' is scheduled for addition, but is missing
This happens because some material is deleted from the project (and I cannot use svn to delete it). Is there a way to say svn to ignore such files, or just to delete it them if they are not found ?
When you do a svn status
, the output will show any such files which are "missing" as a line starting with an exclamation mark:
! 425/file.png
You should write a script (in your scripting language or command line shell of choice) which parses this output, looks for lines starting with an exclamation mark, extracts the filename, and which then does a svn revert <filename>
. This will then undo the local change to that file, allowing you to commit without problems.
edit: since you mentioned a php script in a comment, I suppose you are familiar with PHP scripting. In that case you can make use of the PHP function svn_status.
edit2: if you want to delete the file from the repository, do a svn rm --force <filename>
instead.
So you svn add
the file but later on deleted it manually? Try;
svn rm --force file.png
to remove it from the SVN index.
Run the following command from Terminal:
svn revert $(svn st | awk 'BEGIN{FS=""} $1=="!" && $2 !~ /\.(sql|log|tmpl)$/ {print $2}')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With