linux svn 撤销del,svn delete-删除文件和目录的实例
delete (del, remove, rm): 從版本庫中刪除文件和目錄。
用法: 1、delete PATH...
2、delete URL...
1、每個(gè) PATH 指定的項(xiàng)目會(huì)被調(diào)度到下次提交時(shí)從版本庫刪除。除非給出
--keep-local 參數(shù),工作副本中沒有提交的文件和目錄會(huì)被立即刪除。
如果 PATH 是未版本控制或者已修改的項(xiàng)目,或者包含這些項(xiàng)目,那么僅當(dāng)
給出 --force 參數(shù)時(shí)這些項(xiàng)目才會(huì)被刪除。
2、每個(gè) URL 指定的項(xiàng)目會(huì)通過立即提交從版本庫中刪除。
有效選項(xiàng):
--force: 強(qiáng)制操作運(yùn)行
-q [--quiet] : 不打印信息,或只打印概要信息
--targets ARG: 傳遞文件 ARG 內(nèi)容為附件參數(shù)
-m [--message] ARG : 指定日志信息ARG
-F [--file] ARG: 從文件ARG讀取日志信息
--force-log: 強(qiáng)制校驗(yàn)日志信息資源
--editor-cmd ARG : 使用 ARG 作為外部編輯器
--encoding ARG : 將ARG的值視為字符編碼
--with-revprop ARG : 在新版本設(shè)置版本屬性 ARG
使用格式 name[=value]
--keep-local : 在工作副本中保留路徑
全局選項(xiàng):
--username ARG : 指定用戶名稱 ARG
--password ARG : 指定密碼 ARG
--no-auth-cache: 不要緩存用戶認(rèn)證令牌
--non-interactive: 不要交互提示
--trust-server-cert: 不提示的接受未知的 SSL 服務(wù)器證書(只用于選項(xiàng) “--non-interactive”)
--config-dir ARG : 從目錄 ARG 讀取用戶配置文件
--config-option ARG: 以下屬格式設(shè)置用戶配置選項(xiàng):
FILE:SECTION:OPTION=[VALUE]
例如:
servers:global:http-library=serf
例子
Using svn to delete a file from your working copy deletes your local copy of the file, but it merely schedules the file to be deleted from the repository. When you commit, the file is deleted in the repository.
$ svn delete myfile
D???????? myfile
$ svn commit -m "Deleted file 'myfile'."
Deleting?????? myfile
Transmitting file data .
Committed revision 14.
然而直接刪除一個(gè)URL,你需要提供一個(gè)日志信息:
$ svn delete -m "Deleting file 'yourfile'" file:///var/svn/repos/test/yourfile
Committed revision 15.
如下是強(qiáng)制刪除本地已修改文件的例子:
$ svn delete over-there
svn: Attempting restricted operation for modified resource
svn: Use --force to override this restriction
svn: 'over-there' has local modifications
$ svn delete --force over-there
D???????? over-there
常用操作
1.使用svn從工作拷貝刪除文件只是預(yù)定要?jiǎng)h除,當(dāng)你提交,文件才會(huì)從版本庫刪除。
$ svn delete myfile
2.然而直接刪除一個(gè)URL,你需要提供一個(gè)日志信息:
$ svn delete -m “Deleting file ‘yourfile’” file:///tmp/repos/test/yourfile
3.強(qiáng)制刪除本地已修改文件的例子:
$ svn delete –force over-there
總結(jié)
以上是生活随笔為你收集整理的linux svn 撤销del,svn delete-删除文件和目录的实例的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux模拟主机宕机,AIX HA模拟
- 下一篇: 不知道威固是哪个国家的品牌?