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.
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:
- Do a recursive get at the snapshot point on the mapped path
- Check-in everything as "add" to the target system (IMPORTANT: history before snapshot point will not be migrated)
- 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="<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.
Comments
Anonymous
December 19, 2012
Is this the same process that would be used for a 2008 to 2012 migration?Anonymous
December 19, 2012
Where can I find the "reference to MigrationSourceGUID"?Anonymous
January 18, 2013
Kerry, yes the snapshot feature is the same for 2008/2010/2012 migrations.Anonymous
January 18, 2013
The comment has been removedAnonymous
September 02, 2014
The comment has been removedAnonymous
September 02, 2014
@John/@Kerry, the GUID is generated when you create a session using the administration tool and you can find it in the session configuration XML.