API签入到版本控制

API签入到版本控制

本文介绍了TFS Rest API签入到版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从VSTS扩展程序中,我需要能够检出,编辑和检入(本地TFVC/TFS存储库v2015.3)

From a VSTS extension I need to be able to check-out, edit, and check-in (on-prem TFVC/TFS repo v2015.3)

在文档 https://www.visualstudio.com/en-us/docs/integrate/api/tfvc/overview 尚不清楚是否有APi可以做到

In the documentation https://www.visualstudio.com/en-us/docs/integrate/api/tfvc/overview it is not clear if there is an APi to do that

MSFT将其实现为自己的Web访问代码"编辑器使用: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/2216206-provide-check-in-check-out-functionity -through-t# {toggle_previous_statuses}

MSFT implemented it for their own Web Access "Code" Editor use: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/2216206-provide-check-in-check-out-functionality-through-t#{toggle_previous_statuses}

因此,有一种方法可以实现这一目标.我曾尝试对每种浏览器调试的方式进行逆向工程,但是缩小/捆绑的代码不容易阅读.

So, there is a way to achieve this. I`ve tried to reverse engineer how they did it per Browser Debugging, but the minified/bundled code is not easy to read.

有人可以给我一个例子,说明如何使用JS/TypeScript中的每个REST api检入源代码控制的项目吗?谢谢!

Can somebody please just give me an example on how to do the check-in of source-controlled items per REST api in JS/TypeScript? Thanks!

推荐答案

为我自己的问题找到了解决方案,现在将尝试: https://www.visualstudio.com/zh-CN/docs/integrate/extensions/reference/client/api/tfs/versioncontrol/tfvcrestclient/tfvchttpclient2_2#method_createChangeset

Found solution to my own problem, will now try:https://www.visualstudio.com/en-gb/docs/integrate/extensions/reference/client/api/tfs/versioncontrol/tfvcrestclient/tfvchttpclient2_2#method_createChangeset

这篇关于TFS Rest API签入到版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 02:55