我正在寻找一个自动化命令行来提交对部分工作空间所做的所有更改,包括文件添加和删除。
cm checkin“path”--all
适用于非部分工作空间,包括新文件和已删除文件
和
cm partial checkin“path”--applychanged
适用于部分工作空间,但不适用于新文件或已删除文件。
由于“cm partial”没有--all关键字可用,我希望有一个解决方法,塑料将包括在部分工作空间中更改,添加或删除的所有文件。
有什么想法吗?
帮助打印“CM PARTIAL CHECKIN”
提交对存储库的更改。
用法:
cm partial checkin | ci [<item_path>+] [-c=str_comment] [--applychanged] [--keeplock] [--silent] [--dropconflicts]
选项:
item_path Items to be checked-in, separated by spaces. Quotes (") can be used to specify paths containing spaces. Use . to apply checkin to current directory. -c Specifies a comment to the changeset created in the checkin operation. --applychanged Applies the checkin operation to the changed items detected in the workspace along with the checked out items. --keeplock Keeps the lock of the locked items after the checkin operation. --silent Does not show any output. --ignorefailed Any changes that cannot be applied (because the lock - a.k.a. exclusive checkout - cannot be adquired or because local changes are in conflict with the server changes) are discarded and the checkin operation continues without them.
说明:
- If <item_path> is not specified, the checkin will involve all the pending changes in the workspace. - The checkin operation is always applied recursively from the given path. - To checkin an item: - The item must be under source code control. - The item must be checked out. - If the item is changed but not checked out the --applychanged flag has to be specified. Revision content should be different from previous revision in order to be checked in.
示例:
cm partial checkin file1.txt file2.txt (Applies the checkin to file1.txt and file2.txt checked-out files.) cm partial checkin . (Applies checkin to current directory.) cm partial ci file1.txt -c="my comment" (Applies the checkin to file1.txt and includes a comment.) cm partial checkin --applychanged (Applies the checkin to all pending changes in the workspace.)
答案 0 :(得分:2)
部分工作空间中没有针对本地添加和删除文件的特定命令,但您可以在部分工作区中使用下一个解决方法:
1)cm findprivate | cm partial add -
2)cm status --localdeleted --short | cm rm -
3)cm partial checkin