locked
Create & Access Changesets TFS SDK C# RRS feed

  • Question

  • Hi Guys!

    I have made a quite a progress and posts in this Forum has really helped. But I have hit a road block again.

    I have to create new folder & files inside Branch which I have managed to do. Now, my goal is to add some data in the files and TFS will create the Changesets for each change to these files. This also I managed. Later I want to access these changesets.

    Three Issues.

    1. Every time I create files I have to create a temporary Workspace,map it to local folder, create a file and then add & CheckIn. Now, is there an alternative to that? Is it possible to directly create a file with out going through the whole thing?

    2. Every time I have to edit the file I have to repeat the same as above.Create Workspace, Map it locally, Download the file, Edit, CheckIn. Only then TFS creates a changeset. Can we somehow overcome that and directly edit the files in the TFS branch and still have changesets?

    3. I can retrieve and compare the code in different changesets but for that too I have to download the file and compare them using code or a tool. Is there a way to directly retrieve and display all changesets and let the user decide which one to select??

    My goal is to create branches. Inside the Branches I will create subfolders and store data in files. These files will store JSON object or XML. Content of the files will be some table related data. Whenever there are any changes to the file TFS will create changesets. These changesets will actually be a sort of history for the data in my files. Later I want to display all changesets and let user chose from the available changesets.

    I know how to do all that but there is lot of overhead of Creating temp workspaces, mapping them, then changing , CheckIn and so on...

    Is there a way I can resolve the Three Issues above? Or is there any other way to do this? Any Tool or API? How about the new REST API for TFS. Can it resolve my issues?

    -Sam



    Thursday, August 13, 2015 3:31 AM

All replies

  •  Hello Sam,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay.

    Appreciate your patience.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Friday, August 14, 2015 6:20 AM
    Moderator
  • Hi Sam,

    Seems that you asked the same issue on stackoverflow :). http://stackoverflow.com/questions/31983995/create-access-changesets-and-more-tfs-sdk-c-sharp

    If you don't have local workspace, you have to create temp workspace, mapping, checking in and etc. You can extract above code to a method and call the method in your function to avoid adding multiple lines of code every time.

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, August 17, 2015 8:30 AM
    Moderator
  • Hi Vicky,

    Thanks for the response!

    Yes, I have posted to involve more people into it. Anyone can know that if they Bing/Google it.

    Anyway, the questions is not that I have local workspaces or not. Question is I want to do the above without having to create workspaces !  And if I have to use workspace how to do deal with it.

    "You can extract above code to a method and call the method in your function to avoid adding multiple lines of code every time. "

    Not sure what do you mean. I am sure I know how to call my functions!

    Sam 

    Tuesday, August 18, 2015 1:29 AM
  • We have made some progress. Now we plan to Map each Client to Single workspace. So some of the issues are sorted out.

    But, I would like to know if we can directly edit the files in Server Workspace without having to MAP them to Local Workspace??

    Sam

    Wednesday, August 19, 2015 5:19 AM