I have a small local repository where I've been maintaining versions of
a certain ColdFusion application. The app is written by another vendor,
and most of the code is distributed in ColdFusion's native "encrypted"
format. (A largely binary format.) The encrypted form is the official
release, and the one I install at clients, but I have access to a
decrypted version as well. Subversion makes it very easy for me to
track their changes between versions, or to get back any particular
release I need. I guess I don't need to spend long on the benefits of
Subversion.
I'm running on Windows, but ColdFusion is (I hear) from Unix roots, and
some of the tools I and others rely on use Unix line endings. I'd had
some occasional problems where CF was unhappy with a file because of
mixed line-endings. Reading some of the wisdom from this list and other
places, I modified my svn config file, with
*.cfm = svn:eol-style=native
(among many other entries) and patted myself on the back for using SVN
correctly. I thought a bit about the encrypted files, but I figured
that since I would only access the repository from a Windows client,
"native" would always mean the same thing.
Just today, one of my clients had a problem with a file that had come
through my SVN repository. The encrypted version was corrupted - it
couldn't be decrypted, nor could it be parsed by ColdFusion. I compared
the bad file with a known-good encrypted version and found many
changes. Most notably 0A (hex) translated to 0D0A, but also low-ASCII
characters (02 thru 1E on a quick skim) translated to 2E.
Sadly, I didn't track my SVN config file in SVN, so I can't be sure when
exactly I made the change relative to other commits. The config change
was about two months ago, but I have been actively using this repository
for most of a year. Since the code is not my own I could start over,
but I can think of more fun things to do than reliving about 200 commits
worth of my life.
So my questions are:
* Are these changes consistent with the effects of
"svn:eol-style=native" on a binary file?
* How can I tell if SVN was the cause or the result of a different
tool? (E.G. transferring the file via FTP in ASCII mode) I knew
about 0A to 0D0A translation, but the control characters surprised me.
* What is the appropriate way to figure out which files in my
repository may have been affected by this configuration?
* Once I figure out which files are affected, is there a clean way
to extract the files out of SVN again, reversing any damage?
* How do others deal with file extensions which could be either
ASCII or binary?
* Has anyone worked out a good way to work with mixed encrypted and
plaintext ColdFusion files and still benefit from automatic EOL
handling?
Thanks for any advice.
Received on Wed May 23 00:52:14 2007