开发者

SVN remove deleted

开发者 https://www.devze.com 2022-12-20 03:31 出处:网络
How can I remove files&directories (from my localcopy) that have been already removed from svn repository (server) by somebody else?

How can I remove files&directories (from my localcopy) that have been already removed from svn repository (server) by somebody else?

I'd like to keep my changes (and added files) untouched. And by "my changes" I mean that I have added some new files but their are not yet under svn (their have the "?" status).

开发者_如何学GoAfter performing "svn update" and "svn stat" I get a list of files that prefixed with "?" - those files are my changes mixed with deleted files.

Is there any way to remove those "deleted" files? It would be nice to delete them only if they are not modified by me.


I recommend not trying to come up with a scripting solution here; the safest thing to do is inspect each file and determine if it needs to be kept or not.

And you should be able to tell which files are new and which were previously in the repository just by looking at prior revisions and seeing if the file exists.


Add your modified files to svn

then list all the statuses, find all that have "?" state and delete them.

svn status | grep ^? | xargs rm -v

The trick is getting all your new files under version control, deleting the "deleted files" is then easy.

0

精彩评论

暂无评论...
验证码 换一张
取 消