SVN command to delete all locally missing files

后端 未结 12 2375
说谎
说谎 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:40

    A slight modification of the command line, which works on Mac OS (hopefully even on Linux) and copes with the files the command "svm sr" reports, like "!M" (missing and modified).

    It copes with spaces in the files.

    It is based on a modification of a previous answer:

    svn st | grep ! | sed 's/!M/!/' | cut -d! -f2| sed 's/^ *//' | sed 's/^/"/g' | sed 's/$/"/g' | xargs svn --force rm
    

提交回复
热议问题