TFS Integration Platform – How to enable or disable migrating history for source files: Question & Answer 19

Question

The question we received was “how to enable or disable migrating history for source files”, using the TFS Integration Platform.Blue Person Using A Paintbrush On A Flat Screen Computer Monitor To Create An Image, Or This Could Be A Designer Designing A Website Clipart Illustration Graphic

Thanks to Hyung we have a quick overview and configuration example to share.

Overview (Answer)

TFS Integration Platform supports migrating VC Changesets after a Changeset X, known as snapshot mode. The starting point is configurable and instructs the VC Provider to:

  1. Do a recursive get at the snapshot point on the mapped path
  2. Check-in everything as "add" to the target system (IMPORTANT: history before snapshot point will not be migrated)
  3. Continue migration after the snapshot point

Snapshot point

TFS Integration Platform supports a global snapshot point as well as path-level snapshot point.

Global snapshot point

A global snapshot point, it will be used for all mapped paths (FilterPairs) except the ones that have path-level snapshot points configured.

    1: <CustomSettings>
    2: <SettingXml>
    3:   <VCSessionCustomSetting>
    4:  <Settings>
    5:    <Setting SettingKey="SnapshotStartPoint" SettingValue="&lt;reference to MigrationSourceGUID>;<changeset number where history starts>" />
    6:  </Settings>
    7:   </VCSessionCustomSetting>
    8: </SettingXml>
    9: </CustomSettings>

Example:

<Setting SettingKey="SnapshotStartPoint" SettingValue="1F87FF05-2E09-49c8-9E9B-0AC6DB9DD595;100000" />

Path level snapshot point

This is the most common use of the VC snapshot feature.

    1: <xs:element minOccurs="2" maxOccurs="2" name="FilterItem">
    2: <xs:complexType>
    3: <xs:attribute name="MigrationSourceUniqueId" type="GUID" use="required" /> 
    4: <xs:attribute name="FilterString" type="xs:string" use="required" />       
    5: <xs:attribute name="SnapshotStartPoint" type="xs:string" use="optional" /> 
    6: <xs:attribute name="MergeScope" type="xs:string" use="optional" /> 
    7: </xs:complexType>
    8: </xs:element>

Example:

<FilterPair>

  <FilterItem MigrationSourceUniqueId="1F87FF05-2E09-49c8-9E9B-0AC6DB9DD595" 
                    FilterString="$/test1/feature1" 
                    SnapshotStartPoint="200000" />

  <FilterItem MigrationSourceUniqueId="8C85D8EB-F3B3-4f05-B8DC-C0AB823F1A44" 
                    FilterString="$/test1/feature1" />

</FilterPair>

We are planning two new guidance documents, focused on configuration and conflict resolution, which will address a lot of the questions we have received to date. Keep an eye on our blog for information in this regard.