Update submitted Perforce changelist description by P4.net api
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的更多相关文章
- Dynamics CRM2016 Update or Create parentcustomerid in Contact using  web api
		联系人实体中有个特殊的字段parentcustomerid 在通过web api创建或更新记录时,如果在给这个字段赋值时当做查找字段对待的话,那你就会遇到问题了,报错信息如下 正确的赋值方式如下 
- linux下perforce(p4)的使用方法和命令
		环境变量: export P4PASSWD=abcdefg export P4CLIENT=dyoldfish.com export P4USER=dyoldfish export P4PORT=19 ... 
- perforce 使用教程(zz)
		http://www.perforce.com/documentation/perforce_technical_documentation http://blog.csdn.net/brucexu1 ... 
- Perforce查看workspace sync到的changlist
		一 查看workspace sync到的changelist perforce的workspace其实是一些特定版本的文件的 结合,相比只将workspace对应到某个特定的changelist,此方 ... 
- [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 ... 
- C# 通过反射获取MVC Controller里的类名,方法名,参数列表,返回值类型,Description描述,自定义Attribute
		需要反射的DLL里的一个类: namespace ElegantWM.WebUI.Areas.Admin.Controllers { [Description("功能模块管理")] ... 
- iOS—如何申请苹果公司开发者账号流程详细图文介绍(包括邓白氏编码的申请方法详细介绍)
		我们要申请开发者账号,首先就需要先注册一个苹果的apple id,然后再这个账号的基础上去继续,这个相信大家都知道 这是申请appleid的地址:https://appleid.apple.com/a ... 
- 如何查看Android SDK源码版本
		PLATFORM_VERSION := 4.2.2 位于/build/core/version_defaults.mk # # Copyright (C) 2008 The Android Open ... 
- 支持不同Android设备,包括:不同尺寸屏幕、不同屏幕密度、不同系统设置
		Some of the important variations that you should consider include different languages, screen sizes, ... 
随机推荐
- NUMA 体系架构
			NUMA 体系架构 SMP 体系架构 NUMA 体系架构 NUMA 结构基本概念 Openstack flavor NUMA 策略 Nova 实现 NUMA 流程 1. SMP 体系架构 CPU 计算 ... 
- eclipse版本信息及操作系统
			一.查看版本信息: 进入到eclipse安装目录下,有一个.eclipseproduct文件,用记事本打开,就可以知道版本了,后面version=的值就是版本 二.是否为32位操作系统: 找到ecli ... 
- loadrunner之analysis详解
			本文原出处:http://blog.csdn.net/lykangjia/article/details/56009750 一.常用到的性能测试术语 1.事务(Transaction) 在web性能测 ... 
- Java 常用类String类、StringBuffer类
			常用类 String类.StringBuffer类 String代表不可变的字符序列 "xxxxxxx"为该类的对象 举例(1) public class Test { publi ... 
- unix系统内核优点
			1.可靠性高 unix的可靠性2.伸缩性强 unix的伸缩性3.开放性好 unix的开放性4.网络功能强 unix的网络功能这是UNIX系统的又一重要特色,特别是作为Internet网络技术基础的TC ... 
- HTML5+规范:Webview的使用详解
			一.知识点 Webview模块管理应用窗口界面,实现多窗口的逻辑控制管理操作.通过plus.webview可获取应用界面管理对象. 1.方法 1.1.all: 获取所有Webview窗口 Array[ ... 
- DB2 V9 默认帐户信息和服务启动信息
			1 dasusr1 DB2 管理服务器用户是管理DAS(Database Adminitrator Service).要完全适用db2 cc 必须启动DAS.DB2 管理服务器(DAS)响应来自 DB ... 
- LoadRunner函数大全之中文解释
			LoadRunner函数大全之中文解释 
- html5兼容
			You can download the latest version of HTML5shiv from github or reference the CDN version at https:/ ... 
- mysql(五)查询缓存
			mysql的逻辑架构图如下: 当开启查询缓存时,mysql会将查询结果缓存到查询缓存区域,结果对应的key是使用查询语句,数据库名称,客户端协议的版本等因素算出的一个hash值. 在下次查询时,根据一 ... 
