SVN command to delete all locally missing files

后端 未结 12 2380
说谎
说谎 2020-12-12 09:13

In SVN is there a command I can use to delete all locally missing files in a directory?

Or failing that, some way of listing only those files that are missing (or, i

12条回答
  •  情歌与酒
    2020-12-12 09:37

    Thanks to Paul Martin for the Windows version.

    Here is a slight modification to the script so Windows files with spaces are taken into account as well. Also the missing.list file will be removed at the end.

    I saved the following in svndel.bat in my SVN bin directory (set in my %%PATH environment) so it can be called from any folder at the command prompt.

    ### svndel.bat
    svn status | findstr /R "^!" > missing.list
    for /F "tokens=* delims=! " %%A in (missing.list) do (svn delete "%%A")
    del missing.list 2>NUL
    

提交回复
热议问题