While the link to the Shai Raiten blog turned out to be useful, the reason for the change was not very clear in the answer above, and in the Shai blog (or in the Microsoft documentation , for that matter). The key here is the meaning of fromVersion and toVersion. It seems that the author made this question the same mistake as me in not understanding the meaning of these parameters. In my case, I realized that the “from” and “to” are links to the source (start point) and target (end point) of the merger, respectively. Although I did not understand why the "to" version should be specified in this case, since in order to actually perform a meaningful merge, the target version should always be a hint. Thus, reading the parameter description as the “initial” and “final” versions did not show me that this contradicted this interpretation.
Finally, I realized that in this case, “from” and “to” refer to the source of the merge, where “from” refers to the start point for a series of change sets and “to” refers to the end point for a series of change sets. If you omit the fromVersion parameter, you say that you want to include all the changes at the beginning (or the last recorded merge), otherwise you say that you want to include only the set of changes coming from the specified version. If you omit "toVersion", then you say that you want to include all changes in the Tip version, otherwise you say that you want to include changes only up to the specified version.
So, in the source code with the fromVersion and toVersion parameters specified as VersionSpec.Latest, you say that you want to merge all the changes that occur between the latest version and the latest version, which by definition does not contain changes. However, in a modified code with a zero value specified for both parameters, you include all available revisions without restrictions.
source share