简体   繁体   中英

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.

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. It will move the file, but it can't commit deleting "1.txt" when "1.txt" was never committed in the first place.

Is there a way to tell svn to commit the list of files, but to skip any files in the list that cause errors?

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
...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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