Linux 从 svn 存储库中删除文件夹

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9317600/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 04:37:30  来源:igfitidea点击:

Deleting a folder from svn repository

linuxsvnterminal

提问by user1214633

I sometimes make mistakes with svn and have folders stuck in my repository. I want to remove these folders but I cannot figure out a way to do this. Keep in mind I am very new with SVN. I am running this command from apple terminal:

我有时会在使用 svn 时出错,并将文件夹卡在我的存储库中。我想删除这些文件夹,但我想不出办法来做到这一点。请记住,我对 SVN 很陌生。我从苹果终端运行这个命令:

sudo svn delete http://www.yourrepository.com/svn/folder

sudo svn delete http://www.yourrepository.com/svn/folder

I get the message :

我收到消息:

Anthony-Work-Mac-Pro:htdocs APN$ sudo svn delete http://www.yourrepository.com/svn/folder
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options

I have also tried svn delete, and svn rm.

我也试过svn delete,和svn rm

What do I need to do?

我需要做什么?

采纳答案by crashmstr

Looks like a commit message is required, and you do not have your system configured to launch an editor for you to add one (without specifying on the command line).

看起来需要提交消息,并且您没有将系统配置为启动编辑器来添加一个编辑器(无需在命令行上指定)。

Try this:

尝试这个:

svn delete http://www.yourrepository.com/svn/folder --message "Deleting"

回答by Alexander Pavlov

To avoid similar messages in the future, add something like export SVN_EDITOR="/usr/bin/vim"to your .bash_profile (or something similar for your Mac :))

为避免将来出现类似消息,请在export SVN_EDITOR="/usr/bin/vim"您的 .bash_profile 中添加类似内容(或适用于您的 Mac 的类似内容 :))

回答by MayurKubavat

You can use 2 step delete and commit for this as well. No need to use repository URL.

您也可以为此使用两步删除和提交。无需使用存储库 URL。

svn delete filename1 filename2 forldername1 
svn commit -m "[Message] Unwanted files and folder."