Firstly download the p4.net sdk from Perforce official site's download page.

It's a .zip file, extract it to disk and you'll find a README.txt for how to create a .net application to use the API.

And here is the C# code to update a submitted changelist's description:

 using Perforce.P4;

 namespace ModifyP4CLDescription
{
class Program
{
static void Main(string[] args)
{
string uri = "my_perforce_server:1666";
string user = "my_user_name";
string ws_client = "my_work_space_name"; Server server = new Server(new ServerAddress(uri));
Repository rep = new Repository(server);
Connection con = rep.Connection; con.UserName = user;
con.Client = new Client();
con.Client.Name = ws_client; con.Connect(null); Changelist c = rep.GetChangelist();
string newDiscription = c.Description + "modify my description";
c.Description = newDiscription;
ChangeCmdOptions opts = new ChangeCmdOptions(ChangeCmdFlags.Update);
c = rep.UpdateChangelist(c, opts);
29 }
}
}

Update submitted Perforce changelist description by P4.net api的更多相关文章

  1. Dynamics CRM2016 Update or Create parentcustomerid in Contact using web api

    联系人实体中有个特殊的字段parentcustomerid 在通过web api创建或更新记录时,如果在给这个字段赋值时当做查找字段对待的话,那你就会遇到问题了,报错信息如下 正确的赋值方式如下

  2. linux下perforce(p4)的使用方法和命令

    环境变量: export P4PASSWD=abcdefg export P4CLIENT=dyoldfish.com export P4USER=dyoldfish export P4PORT=19 ...

  3. perforce 使用教程(zz)

    http://www.perforce.com/documentation/perforce_technical_documentation http://blog.csdn.net/brucexu1 ...

  4. Perforce查看workspace sync到的changlist

    一 查看workspace sync到的changelist perforce的workspace其实是一些特定版本的文件的 结合,相比只将workspace对应到某个特定的changelist,此方 ...

  5. [ImportNew] Perforce - Restoring Mistakenly Deleted Files in Workspace

    Shit happens when you accidentally delete some files in your workspace and you have no ideas which o ...

  6. C# 通过反射获取MVC Controller里的类名,方法名,参数列表,返回值类型,Description描述,自定义Attribute

    需要反射的DLL里的一个类: namespace ElegantWM.WebUI.Areas.Admin.Controllers { [Description("功能模块管理")] ...

  7. iOS—如何申请苹果公司开发者账号流程详细图文介绍(包括邓白氏编码的申请方法详细介绍)

    我们要申请开发者账号,首先就需要先注册一个苹果的apple id,然后再这个账号的基础上去继续,这个相信大家都知道 这是申请appleid的地址:https://appleid.apple.com/a ...

  8. 如何查看Android SDK源码版本

    PLATFORM_VERSION := 4.2.2 位于/build/core/version_defaults.mk # # Copyright (C) 2008 The Android Open  ...

  9. 支持不同Android设备,包括:不同尺寸屏幕、不同屏幕密度、不同系统设置

    Some of the important variations that you should consider include different languages, screen sizes, ...

随机推荐

  1. idea scala 报 with UTF-8 Please try specifying another one using the -encoding option

    现象如下图, 代码里有汉字,执行代码报错,说编码格式不对, 修改方式如上面,将右下角的编码格式修改成 u8即可.

  2. kubernetes nfs-client-provisioner外部存储控制器

    介绍: nfs-client-provisione是一个专门用于NFS外部目录挂载的控制器,当多个副本创建时,他们的命名方式如下: pv provisioned as ${namespace}-${p ...

  3. VSCode打开已有vuejs项目

    转载自 https://blog.csdn.net/yoryky/article/details/78290443 下载安装并配置VSCode 随便百度上搜个最新的VSCode安装好后,点击Ctrl ...

  4. Scrum立会报告+燃尽图(十月二十三日总第十四次)

    此作业要求参见:https://edu.cnblogs.com/campus/nenu/2018fall/homework/2246 项目地址:https://git.coding.net/zhang ...

  5. 咱们的team1序章

    之前都参加了好多组织,这是第一次参加变成组织.首先要介绍团队名称了,为什么叫“咱们的team”呢,因为,我们需要每个人都认真的参与进来,只有每个人都十分投入地参与进来,这个team才能称之为一个tea ...

  6. 查看struts包源码

  7. 第二次程序+PSP0级

    第二周,老师接着上次的程序有对四则运算的程序,做出来一些要求,这次要求可以控制乘除法,有无括号,控制输出方式,控制结果有无负数,有无余数. 我在对原先的程序分析了一下,发现我原先的程序可扩展性特别差, ...

  8. HDU 5170 GTY's math problem 水题

    题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5170 bc(中文):http://bestcoder.hdu.edu.cn/contests ...

  9. 周总结<6>

    周次 学习时间 新编写代码行数 博客量(篇) 学到知识点 13 10 100 2 网页设计:邻接矩阵深度以及广度遍历

  10. Alpha事后诸葛(团队)

    [设想和目标] Q1:我们的软件要解决什么问题?是否定义得很清楚?是否对典型用户和典型场景有清晰的描述? "小葵日记"是为了解决18-30岁年轻用户在记录生活时希望得到一美体验友好 ...