Perforce:想要多行描述

时间:2019-04-01 10:05:42

标签: perforce

嗨,我想使用以下命令添加多行描述

p4 --field Description="MY CLN Header \\n my CLN complete description in two -three lines update " change -o |p4 change -i

1 个答案:

答案 0 :(得分:1)

如果您不能说服外壳程序在命令行参数中传递必需的换行符和制表符,请尝试告诉--field选项将第二行追加到第一行:

p4 --field Description="MY CLN Header" --field Description+="my CLN complete description in two -three lines update" change -o|p4 change -i

(编辑),或者,因为那是越野车,您可以使用P4Perl做这样的事情:

$change = $p4->FetchChange();
$change->_Description( "MY CLN Header \n my CLN complete description in two -three lines update " );
$form = $p4->FormatChange( $change );
$p4->SaveChange( $form );