简体   繁体   English

SVN:提交和跳过文件

[英]SVN: Commit and skip files

I'm using SVN to move files and then only commit the changes to the files that I've touched. 我正在使用SVN来移动文件,然后仅将更改提交到我所触摸的文件。

I've got this working fine with the code: 我的代码工作正常:

svn move "1.txt" "2.txt"
svn commit "1.txt" "2.txt" -m "Moved file"

I'm running in to problems when "1.txt" was never committed to svn, only added locally. 当“ 1.txt”从不提交到svn时,仅在本地添加,我遇到了问题。 It will move the file, but it can't commit deleting "1.txt" when "1.txt" was never committed in the first place. 它将移动文件,但是当从来没有提交过“ 1.txt”时,它无法提交删除“ 1.txt”。

Is there a way to tell svn to commit the list of files, but to skip any files in the list that cause errors? 有没有办法告诉svn提交文件列表,但是跳过列表中会引起错误的任何文件?

The software that I'm modifying can't read the responses from the commands run, otherwise I would do something like 我正在修改的软件无法读取运行命令的响应,否则我会做类似的事情

svn status

and go through the files listed to determine which ones need to be committed. 并浏览列出的文件以确定需要提交的文件。

Single commit per file and ignore (possible) errors 每个文件一次提交并忽略(可能)错误

svn move <file-list>
svn ci 1.txt
svn ci 2.txt
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM