a·gen·tic a·gil·i·ty

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Explains how to resolve case sensitivity conflicts when migrating from Subversion to TFS 2010, including tools and steps to handle duplicate target item errors.

Published on
5 minute read
Image
https://nkdagility.com/resources/z1EKAHhrUI7
Subscribe

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item Running into problems when migrating a Subversion Repository to Team Foundation Server is what to so with conflicts resulting from SVN being Case Sensitive and TFS not.

note: Case Sensitivity is mostly a bad idea for files, url’s and code.


On of the problems with Subversion is that it treats “/trunk/a.txt” and “/trunk/A.txt” as two different files. This can cause conflicts during the migration that need to be resolved.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item Figure: The migration runs smoothly for a while.

For the smaller sets that I migrated to test this tool it worked just fine, but the larger the data set, the more likely you are to encounter errors. The first set was 1700+ changes, but this one is 24000+ which mean that it is more than 10 times more likely to encounter a conflict.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item Figure: Unable to resolve conflict where two changes have the same target item

Dam, but conflicts suck. This particular conflict is due to two changes from Subversion are being applied to the same file in a single changes. We need to be able to resolve this as you will not be able to make changes to what is migrated and then rerun that portion.

 1LogicalOperationStack=Migrate, Main
 2DateTime=2011-08-26T16:21:57.8098771Z
 3[8, 4532, 8/26/2011 9:21:57 AM, Migrate] Stopping (overall: 00:00:01.1687929)
 4MigrationConsole.exe Warning: 0 : The migration engine is unable to resolve a conflict where two changes have the same target item:
 5LogicalOperationStack=Main
 6DateTime=2011-08-26T16:21:57.8108537Z
 7MigrationConsole.exe Information: 0 : Microsoft.TeamFoundation.Migration.Toolkit.UnresolvableConflictException: The migration engine is unable to resolve a conflict where two changes have the same target item:
 8   at Microsoft.TeamFoundation.Migration.Toolkit.ChangeOptimizer.detectConflicts()
 9   at Microsoft.TeamFoundation.Migration.Toolkit.ChangeOptimizer.Resolve()
10   at Microsoft.TeamFoundation.Migration.Toolkit.BatchingContext.Flush()
11   at Microsoft.TeamFoundation.Migration.Toolkit.VC.SourceToTfsMigrationEngine.Flush(BatchingContext context)
12   at rlEDq7v0Ex0lXcB8eF.3RBgRNXCby0G0kR3Z1.Flush(BatchingContext context)
13   at Microsoft.TeamFoundation.Migration.Toolkit.VC.SourceToTfsMigrationEngine.ProcessChangeGroup(ChangeGrouping group)
14   at rlEDq7v0Ex0lXcB8eF.3RBgRNXCby0G0kR3Z1.ProcessChangeGroup(ChangeGrouping )
15   at kKnILa3qW3UW4h2H4L.f8pB0cQoQnxV42wuir.ProcessChangeGroup(ChangeGrouping )
16   at Microsoft.TeamFoundation.Migration.Toolkit.VC.VCMigrationEngine.MigrateEach()
17   at Microsoft.TeamFoundation.Migration.Toolkit.VC.VCMigrationEngine.Run()
18   at Microsoft.TeamFoundation.Migration.Toolkit.VC.SourceToTfsMigrationEngine.Run()
19   at rlEDq7v0Ex0lXcB8eF.3RBgRNXCby0G0kR3Z1.Run()
20   at OjkZA5fW18B01Gf9op.bKFnHGSRxN5AAInIof.vonZTPjT0()
21LogicalOperationStack=Main
22DateTime=2011-08-26T16:21:57.8118303Z
23MigrationConsole.exe Information: 0 : Svn2TFS_cgx: The migration engine is unable to resolve a conflict where two changes have the same target item:
24LogicalOperationStack=Main
25DateTime=2011-08-26T16:21:57.8118303Z
26MigrationConsole.exe Warning: 0 : Thread was being aborted.
27LogicalOperationStack=Main
28DateTime=2011-08-26T16:21:57.8235495Z
29MigrationConsole.exe Information: 0 : System.Threading.ThreadAbortException: Thread was being aborted.
30   at System.Threading.Thread.AbortInternal()
31   at System.Threading.Thread.Abort()
32   at OjkZA5fW18B01Gf9op.bKFnHGSRxN5AAInIof.eY3TcUpOH(Thread )
33LogicalOperationStack=Main
34DateTime=2011-08-26T16:21:57.8264793Z

Figure: Well, this is going to be fun

Luckily Timely Migration have a little Support tools to help us. Fire up “Migration Support”, which is in the install folder, and have a bunch of tools to make things easier.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Figure: Which support tool would you like to use

Most migration tools forget about this bit and I have only really seen it in Timely and in the Integration Platform. What I need to be able to do is open the Session Analysis and make a couple of changes to fix the issue. Luckily there is a “Session Viewer” which will open the TfsTimelyMigration database that you created as part of your configuration.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Figure: There are a bunch of features to edit the “Session” data

The first thing we need to do is find out where we are. Clicking the “Get Pending Change Group” will load up that pesky 17018 item that is causing the block.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Figure: You can edit the change group to bypass the problem

It is now a case of figuring out what the problem actually is. There are no “Rename”’s so it is not a case of a Rename causing a conflict, but what is the problem…

I could not figure it out from just scrolling through this list so I though to use the “Save Actions As”, but the output from that provided to be NASTY. Real nasty:

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Figure: What the heck use is this!

So what I decided to do was install the Snagit 10 trial and use the “Capture Text” function.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Figure: Snagit Capture text function gives you grab the entire vertical area in one go

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Figure: Now I have it as a kind of notepad format

Taking this output, pasting it into Excel, creating the data as a table and ordering by “TFS Source” produces an interesting result.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Figure: You can see the dups

Where you might ask, did these come from. Well, in the settings file there was an option for “ItemExistshandler” that for most cases can be set to “ChangeTpEdit”, the only problem is if the file is already an “Add” then you are going to get a conflict like this one.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Figure: Item Exists Handler default to Change to Edit

While this is indeed desired behaviour, it can case this sort of issue when there are files that have slightly different casing when they are added.

While this would remove the conflicts, it would poise the real risk of loosing data.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item Figure: Risky option, change setting to ignore Existing Items

For each item in the list, determine which one is in conflict and remove it manually. This is likely to happen ever time a large number of changes is checked in or reorgs of code happen.

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item

Subversion to TFS 2010: The migration engine is unable to resolve a conflict where two changes have the same target item Figure: Safe option, remove each bad change

It would be really nice if Timely could add the ability to view the conflicts only and be able to bulk apply the resolution as I am looking at 300+ conflicts in a single check-in. At least we are 68% of the way through this particular migration and the chances are (fingers crossed) that there will only be a few conflicts.

Let me know how you get on with your own migrations!

Troubleshooting Software Development
Subscribe

Related Blog

No related videos found.

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

NIT A/S

Bistech Logo

Bistech

Alignment Healthcare Logo

Alignment Healthcare

Qualco Logo

Qualco

Higher Education Statistics Agency Logo

Higher Education Statistics Agency

Akaditi Logo

Akaditi

Trayport Logo

Trayport

ProgramUtvikling Logo

ProgramUtvikling

Schlumberger Logo

Schlumberger

Capita Secure Information Solutions Ltd Logo

Capita Secure Information Solutions Ltd

Jack Links Logo

Jack Links

MacDonald Humfrey (Automation) Ltd. Logo

MacDonald Humfrey (Automation) Ltd.

Boxit Document Solutions Logo

Boxit Document Solutions

Hubtel Ghana Logo

Hubtel Ghana

Lockheed Martin Logo

Lockheed Martin

Slicedbread Logo

Slicedbread

SuperControl Logo

SuperControl

Ericson Logo

Ericson

Washington Department of Transport Logo

Washington Department of Transport

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

New Hampshire Supreme Court Logo

New Hampshire Supreme Court

Nottingham County Council Logo

Nottingham County Council

Ghana Police Service Logo

Ghana Police Service

Slaughter and May Logo

Slaughter and May

MacDonald Humfrey (Automation) Ltd. Logo

MacDonald Humfrey (Automation) Ltd.

Xceptor - Process and Data Automation Logo

Xceptor - Process and Data Automation

Milliman Logo

Milliman

Microsoft Logo

Microsoft

ALS Life Sciences Logo

ALS Life Sciences