2

我正在寻找一个用于自动化的命令行来提交对部分工作空间所做的所有更改,包括文件添加和删除。

厘米签入“路径”--全部

适用于非部分工作空间,包括新文件和已删除文件

cm部分签入“路径”--applychanged

适用于部分工作空间,但不适用于新文件或已删除文件。

由于“cm partial”没有可用的 --all 关键字,我希望有一种解决方法,其中塑料将包括在部分工作空间中更改、添加或删除的所有文件。

有任何想法吗?

帮助打印“CM 部分检查”

提交对存储库的更改。

用法:

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

1 回答 1

2

局部工作区中没有用于本地添加和删除文件的特​​定命令,但您可以在局部工作区中使用下一个解决方法:

1)cm findprivate | cm partial add -

2)cm status --localdeleted --short | cm rm -

3)cm partial checkin

于 2016-01-08T12:39:04.913 回答