locked
How to programmatically get the changeset number from VS Changeset Details window RRS feed

  • Question

  • This page says that we should use the IPendingChangesExt interface for getting details of the Changeset Details window in Visual Studio 2012 and 2013.  I am able to get the interface for the Changeset Details window, as this post shows (and I added my own answer example), which has information for all of the files and whatnot in the Changeset Details window, but it doesn't contain (or at least I can't find) the changeset number for the changeset that the Changeset Details page is showing.

    Is there a way to get the changeset number of the changeset that the Changeset Details page is on?  I even tried looking through the DTE2 object, found the Changeset Details window in there, but couldn't find the window's "document" information to try and parse the changeset number out of it (and that would be quite a hacky way to do it anyways).

    Any suggestions?  Thanks in advance.


    - Dan - "Can't never could do anything"


    • Edited by deadlydog Monday, March 10, 2014 5:49 PM
    Monday, March 10, 2014 5:48 PM

Answers

  • Alright, so while I couldn't find the changeset number displayed on the Changeset Details window, I found I can just go through the IPendingChangesExt.IncludedChanges collection, and each PendingChange in there has Version property, which is the changeset number that I was looking for.

    - Dan - "Can't never could do anything"

    • Marked as answer by deadlydog Monday, March 10, 2014 10:01 PM
    Monday, March 10, 2014 10:01 PM

All replies

  • Alright, so while I couldn't find the changeset number displayed on the Changeset Details window, I found I can just go through the IPendingChangesExt.IncludedChanges collection, and each PendingChange in there has Version property, which is the changeset number that I was looking for.

    - Dan - "Can't never could do anything"

    • Marked as answer by deadlydog Monday, March 10, 2014 10:01 PM
    Monday, March 10, 2014 10:01 PM
  • Hi,

    I'm glad to hear that you got it working.

    Thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.

    Best regards,

    Sunny

    Tuesday, March 11, 2014 2:22 AM