Understanding TFS with AX 2012 (III)

So now some basic tasks with TFS and their approach in AX. Let's look at the way the deletes are handled and then the renames, using a simple example.

Create three classes test1, test2 and test3. Add them to source control and then check in (you will do this on a first  AX instance - let's call it AxOne). Now perform a VC Synchronize on a second instance (AxTwo). You will get both objects.

Now, let's go in AxOne and delete test1. Then, go to AxTwo and perform a Synchronize.

You are getting this as part of your process:

    Delete from $/Test/Project/Classes/test1.xpo with ChangeType: None and Status: Deleting.

Now, since it was deleted from the TFS server, the object should be removed from AxTwo as well. We look at the code in charge to do that, that can be found at:

[c]\Data Dictionary\Tables\SysVersionControlSynchronizeLog\Methods\processDelete 18
[c]\Data Dictionary\Tables\SysVersionControlSynchronizeLog\Methods\processDeletesInBatchNum2
[c]\Data Dictionary\Tables\SysVersionControlSynchronizeLog\Methods\processBatchNum  18

and, after letting the code to process the changes, we will indeed notice that the task is performed properly.

So, let's move over to the rename of an object. A rename should be of course bringing together a delete and an add (the add is actually a rename change action in TFS). And if you look closely at what TFS does this is exactly how it plays out.

Number of Operations: 2
Number of Conflicts: 0
    Delete from $/Test/Project/Classes/test2.xpo with ChangeType: None and Status: Deleting.
    Get C:\#AxR.Test\Project\Classes\test2Rename.xpo from $/Test/Project/Classes/test2Rename.xpo with ChangeType: None and Status: Getting.


The code in charge to do that is found in the same table method

[c]\Data Dictionary\Tables\SysVersionControlSynchronizeLog\Methods\processModelInBatchNum
[c]\Data Dictionary\Tables\SysVersionControlSynchronizeLog\Methods\processBatchNum

At this point we are able to better understand the process of how AX works with TFS.

No comments:

Post a Comment