linux svn 撤销del,svn delete-删除文件和目录的实例
delete (del, remove, rm): 從版本庫中刪除文件和目錄。
用法: 1、delete PATH...
2、delete URL...
1、每個 PATH 指定的項目會被調度到下次提交時從版本庫刪除。除非給出
--keep-local 參數,工作副本中沒有提交的文件和目錄會被立即刪除。
如果 PATH 是未版本控制或者已修改的項目,或者包含這些項目,那么僅當
給出 --force 參數時這些項目才會被刪除。
2、每個 URL 指定的項目會通過立即提交從版本庫中刪除。
有效選項:
--force: 強制操作運行
-q [--quiet] : 不打印信息,或只打印概要信息
--targets ARG: 傳遞文件 ARG 內容為附件參數
-m [--message] ARG : 指定日志信息ARG
-F [--file] ARG: 從文件ARG讀取日志信息
--force-log: 強制校驗日志信息資源
--editor-cmd ARG : 使用 ARG 作為外部編輯器
--encoding ARG : 將ARG的值視為字符編碼
--with-revprop ARG : 在新版本設置版本屬性 ARG
使用格式 name[=value]
--keep-local : 在工作副本中保留路徑
全局選項:
--username ARG : 指定用戶名稱 ARG
--password ARG : 指定密碼 ARG
--no-auth-cache: 不要緩存用戶認證令牌
--non-interactive: 不要交互提示
--trust-server-cert: 不提示的接受未知的 SSL 服務器證書(只用于選項 “--non-interactive”)
--config-dir ARG : 從目錄 ARG 讀取用戶配置文件
--config-option ARG: 以下屬格式設置用戶配置選項:
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.
然而直接刪除一個URL,你需要提供一個日志信息:
$ svn delete -m "Deleting file 'yourfile'" file:///var/svn/repos/test/yourfile
Committed revision 15.
如下是強制刪除本地已修改文件的例子:
$ 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從工作拷貝刪除文件只是預定要刪除,當你提交,文件才會從版本庫刪除。
$ svn delete myfile
2.然而直接刪除一個URL,你需要提供一個日志信息:
$ svn delete -m “Deleting file ‘yourfile’” file:///tmp/repos/test/yourfile
3.強制刪除本地已修改文件的例子:
$ svn delete –force over-there
總結
以上是生活随笔為你收集整理的linux svn 撤销del,svn delete-删除文件和目录的实例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux模拟主机宕机,AIX HA模拟
- 下一篇: linux 其他常用命令