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, ...
随机推荐
- Python:字典操作总结
字典是Python中唯一的映射类型 [注]:字典中数据是无序排放的 一.字典的创建方法 方法1:用大括号包裹键值对从而创建字典 addict={}#创建一个空字典 addict={key1:valu ...
- python 中如何计算时间差...
Q:如何方便的计算两个时间的差,如两个时间相差几天,几小时等 A:使用datetime模块可以很方便的解决这个问题,举例如下: >>> import datetime>> ...
- Eclipse项目导入到Android Studio中
背景 最近需要将Eclipse中的android项目导入到Android Studio中!倒腾一番,记录如下! 步骤1 打开Android Studio(下文称AS),选择Import project ...
- int 和Integer
Java是一个近乎纯洁的面向对象编程语言,但是为了编程的方便还是引入不是对象的基本数据类型,但是为了能够将这些基本数据类型当成对象操作,Java为每一个基本数据类型都引入了对应的包装类型(wrappe ...
- python接口自动化测试框架实现之操作oracle数据库
python操作oracle数据库需要使用到cx-oracle库. 安装:pip install cx-oracle python连接oracle数据库分以下步骤: 1.与oracle建立连接: 2. ...
- linux 内核态调试函数BUG_ON()[转]
一些内核调用可以用来方便标记bug,提供断言并输出信息.最常用的两个是BUG()和BUG_ON(). 当被调用的时候,它们会引发oops,导致栈的回溯和错误信息的打印.为什么这些声明会导致 oops跟 ...
- application/x-www-form-urlencoded 与 application/json区别
两种请求方式对服务器端都没什么影响 application/x-www-form-urlencoded方式是比较老的一种方式,这种方式的好处就是浏览器都支持, 在请求发送过程中会对数据进行序列化处理, ...
- hdu-题目:1058 Humble Numbes
http://acm.hdu.edu.cn/showproblem.php?pid=1058 Problem Description A number whose only prime factors ...
- [LeetCode] Search in Rotated Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 migh ...
- http2.0可行性研究
一.http2比http1有了更多新特性 1.使用了多路复用的技术,并发量支持比http1大几个数量级: 2.二进制分帧,改善网络延迟情况,提高传输速率: 3.支持header的数据压缩,数据体积变 ...