Detail Linux svn command line batch operation
- 2020-06-12 11:40:49
- OfStack
Detail svn command line batch operation on Linux
While git is great and I use git most of the time, there are times when I have to use svn for some reason, and svn on linux doesn't have the same software as tortoisesvn on windows (it's said on the web, but it hasn't worked), so go straight to the command line.
We just install svn and use the command after the file is modified
svn status
To view the trace information of the file, 1 code name will be used, which corresponds to approximately
" " No modification
" A " new
" C " conflict
" D " delete
" G " merge
" I " ignore
" M " change
" R " replace
" X " Not under version control, but used by external definitions
" ? " Not in version control
" ! " The item has been lost ( Be not svn Command to delete ) Or incomplete
" ~ " Version-controlled items have the same name as other types of items
What we need to consider here is "missing" and "not in version control", i.e.! "And" the & # 63; ", just use the following command
svn add `svn status |grep ? |awk '{print $2}'`
svn delete `svn status |grep ! |awk '{print $2}'`
Notice the back quotes in the command, below the "esc" key, next to the "1," indicating a command.
After using the command above, the status of the corresponding file changes to the corresponding "D" and "A", and then the command can be used
svn commit -m "xxxx"
Submitted!
The two command operations mentioned here can be problematic with whitespaces in the file
If you have any questions, please leave a message or go to this site community exchange discussion, thank you for reading, hope to help you, thank you for your support to this site!