Why does Microsoft's source code reference have two copies of the code in each .cs file
So, I was looking in [PATH]\RefSrc\Source\.Net\4.0\DEVDIV_TFS\Dev10\Releases\RTMRel\ndp\fx\src\MIT\System\Web\UI\MobileControls\Panel.cs\1305376\Panel.cs
and noticed that the file, as well as other files I checked, contained two exact duplicates (I checked by pasting both chunks into a diff tool) of the source code. Like so:
[COPYRIGHT MESSAGE 1]
[CODE]
[COPYRIGHT MESSAGE 2]
[COPYRIGHT MESSAGE 1]
[CODE]
[COPYRIGHT MESSAGE 2]
Is there a reason for this? Some weirdne开发者_运维技巧ss with version control or something?
I tried checking the Reference Source Forum and saw someone theorized that it's a bug in the installer, but I am curious if anyone can offer their own insight.
Redundancy, when the first source is corrupt it gets validated or synchronized with the other.
I deleted my RefScr directory and downloaded a clean copy of the package Net 4.5 from http://referencesource.microsoft.com/netframework.aspx
I poked around and found the equivelent directory/file:
\RefSrc\Source\.NET 4.5\4.5.50709.0\net\ndp\fx\src\MIT\System\Web\UI\MobileControls\Panel.cs\550320\Panel.cs
When i manually broke the file into two parts I noticed the files were identical.
I saw the same issue in the newest distribution. I am going to dig in a little further when I get a chance today but now after further investigation I suspect it may have something to do with how the repository is managed.
Given that later releases of the reference source do not include two copies of the source code, I'm going to guess that Hans Passant is probably right (in his comment) that this likely a bug in the tool that generates the source.
精彩评论