none
How to compare Changeset and shelveset files before checkin

    Question

  • I have created a check in policy for code review. after code review item is approved, i want to check that files that are in shelvset and files that are actually checked in all identicals or not, if they are not same then i want to stop checkin.
    Friday, February 18, 2011 5:15 PM

All replies

  • Hello Kapil,

    Based on my understanding, one scenario I can think out is that you save your pending changes in the shelvsets and let your team leader to review the shelvsets. Once the team leader approved the changes in the shelvsets then you want to use one check in policy to compare the shelvsets with the pending changes, if they are the same, you check the pending changes in, if not you don’t check them in.

    Is my guess right? If so I think you can choose to ask the reviewer (team leader) to check in these shelvsets. If you indeed want to use the check in policy to do this work, you can achieve that by using TFS API. You can make a comparison between the pending changes and shelvsets.

    If I misunderstand you, please correct me.

    Thanks,


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 21, 2011 8:39 AM
  • Hi Vicky,

    Yes you understood my problem right.

    Is there any code sample to do the comparison. I had never worked with TFS API before so any code sample with be of great help.

    Thanks,

    -K

     

     

    Friday, February 25, 2011 7:16 PM
  • Hi Vicky,

    Yes you understood my problem right.

    Is there any code sample to do the comparison. I had never worked with TFS API before so any code sample with be of great help.

    Thanks,

    -K

    Monday, March 07, 2011 3:02 PM
  • Hello Kapil,

    Sorry for the late response. And I am sorry there is not any comparison code sample for the moment. Maybe you can get more information from this link here:

    http://archive.msdn.microsoft.com/TfsSdk

    http://www.tfsexamples.com/Default.aspx?AspxAutoDetectCookieSupport=1

    Thanks,


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, March 08, 2011 1:45 AM