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, ...
随机推荐
- C语言--指针详解
这段时间在看 Linux 内核,深觉 C 语言功底不扎实,很多代码都看不太懂,深入学习巩固 C 语言的知识很有必要.先从指针开始. 一.什么是指针 C语言里,变量存放在内存中,而内存其实就是一组有序字 ...
- Pearson Distance
Pearson Distance: where: 1. is the covariance 2. is the standard deviation of 3. is the standard ...
- Wampserver 修改根目录
wampserver 默认根目录在 www 文件夹下 修改根目录方法如下: 1. 在打算存放项目或代码的位置新建文件夹(我建在了C:/MyProject) 2. 打开 httpd.conf 文件(该文 ...
- 亚马逊首次推出卖家APP 可掌握商品盈利状况
美国零售巨头亚马逊近日首次对外发布了第一款针对卖家和商户的客户端,帮助他们更加高效的管理商品和销售数据. 据美国科技新闻网站 Mashable 报道,之前亚马逊在商户移动客户端方面一直空缺,许多商户不 ...
- 转载笔记:DropDownList无限级分类(灵活控制显示形式)
主要使用递归实现,数据库结构: 最终样式: 1protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!Pa ...
- listagg wm_concat 行转列
一. 这个写法和wm_concat相似,listagg(day,',')要把哪一列转换为同一行within group (order by day)同一行如何排序 with temp as ( ' d ...
- 查看dll依赖项
win7 系统: 开始-->所有程序->vs2012文件夹->vs tools->对应的命令提示符 输入命令: dumpbin /dependents 你的文件(可以是exe, ...
- 每日scrum--No.1
Yesterday:无 Today: 查找学校的官方地图和亲自测试其准确性 Problem :不能使地图适应我们的软件;未解决地图上存在的问题: 明天继续加油.
- 团队作业4——第一次项目冲刺(Alpha版本)第一次
一.会议内容 制定任务内容 制作leangoo表格 初步工作 二.各人工作 成员 计划任务 遇见难题 贡献比 塗家瑜(组长) 后端与数据库通讯 无 1 张新磊 表设计 无 1 姚燕彬 测试计划编写 无 ...
- 第7章 监听器Listener
Listener概述 Listener的使用 使用Listener需要实现相应的Listener接口. public class SessionListenerTest implements Http ...