Friday, March 07, 2003
Well, maybe one day I'll remember my own lesson about not typing
anything important into a browser. Of course I lost this post the
first time I typed it.
I encountered a strange problem today. I was updating my local copy
of a Visual Basic 6 project, one of my developers had made a change to
the program, so I wanted to get the most recent version. I noticed
however that my file was only 8k, yet the updated copy on my
developers machine was 33k. I had him add a comment to his file and
commit it again, then I tried to update my copy. Still 8k. I had him
e-mail me a copy of his code, then I copied the recent version of his
code over the top of my directory. I committed the changes to CVS.
When I tried to update I didn't get any error messages and I still had
the 33k file, so I thought I was good.
To be on the safe side I decided to try downloading the project to a
different directory. When I pulled the code down from CVS, it only
came with the 8k version of the file. I tried to remove the file from
CVS and re-add it, that didn't work. I tried removing the file from
CVS, copying a good copy of the file to the directory and renaming
it. Same problem when I tried to retrieve it. When I looked at the
file repository on CVS it was only 10k.
At this point I started diffing the 8k file with the 33k file.
WinMerge thought the files were identical. That obviously wasn't the
case, so off I went in search of WinDiff.
Incidentally WinDiff was a little difficult to locate. I found it at
Microsoft's site, but you could only download it with all of the other
Visual Studio Examples in a bundle. The bundle was 137 MB, so I
decided to look elsewhere. I found a nice looking front end
replacement for windiff, unfortunately it required windiff be
installed to run. Finally I found a site that had all of the Visual
Studio Examples individually packaged for download.
When I WinDiffed the two files I could easily see that the upload to
CVS was stopped at a specific character in the file. Armed with this
knowledge I opened the good copy of the VB Form. I went to the
location where the upload was stopping and found a control character.
VB just renders these as a hollow square block. I copyed the
character into UltraEdit and determined it was character 0x1A or
The specific section of code that contained this character was looking
for occurances of this character in a file and removing it. I changed
the code to look for chr(26) instead. After making this
change and uploading it to CVS, I was able to pull down the full 33k
I still don't know exactly what about that character was causing
either CVS or the Network to puke. It's obvious now though that it
shouldn't occur in a text file.
Comments: Post a Comment