我正在尝试使用 -a 和 -c 选项还原更改列表中的文件。我是这样手动完成的。
p4 revert -c 19264444 file ...
pause
p4 edit -c 19264444 GP*.*
pause
robocopy %SRC% %DEST% *.rom
pause
p4 revert -a 19264444 file ...
尝试使用 p4api.net
同样在这样的给定工作区位置打开特定文件进行编辑时。不确定格式是否会被接受附加在目标路径中。
//Function for Edit changelist
public void EditChangeList(Changelist cl, string fileFormat, string destinationPath)
{
var rep = Connect();
var fs = new FileSpec(new DepotPath(destinationPath + "/" + fileFormat + "/..."));
var ls= rep.Connection.Client.EditFiles(new Options(EditFilesCmdFlags.None, cl.Id, null), fs);
}
// call of above function
p4.EditChangeList(changelist, gp*.*", destinationPath);
我也找不到如何使用 p4api.net 恢复更改列表中的文件。有人可以指导吗?