On Aug 1, 2005, at 12:17 PM, Rick Mann wrote:
> CodeWarrior seems to keep a file open via it's file descriptor, and
> so it doesn't notice that the old file went away. However, I'm not
> sure why it doesn't report an error when one attempts to save (and
> internally, why id doesn't get that error, find and re-open the
> file, and save its current contents to the new file).
That would be a bug in CodeWarrior. Other Mac text editors get this
right. Xcode gets it right. And it's legal file system behavior.
Subversion is not doing anything wrong.
> Note that performing the same steps above with TextWrangler results
> in the file being properly handled, no lost data. It even notices
> that the file's been modified and reads it back in. If you've made
> changes, it even says "[The file] was changed on disk, but could
> not be reloaded because it has unsaved changes.
Yes. Many other text editors handle this properly.
> Now, perhaps CodeWarrior needs to do a better job of keeping track
> of files. Obviously, the problem can be dealt with, as demonstrated
> by TextWrangler.
> I checked out the subversion source and tried to figure out just
> where it creates the new files during a commit. Mac OS X (Darwin)
> supports exchangedata(), a way of doing safe saves of data and
> keeping the same file ID, so that open file handles don't totally
> disconnect (and all atomically). I don't think any other Unix does
> this, but I suspect there's a workaround that would be good. I
> think svn first puts the new pristine copy in the .svn directory,
> then modifies the working copy by creating a new one and deleting
> the old one. Maybe it could instead open the old wc, truncate it,
> and write the new data out.
> The next save in CW would immediately overwrite it, but at least
> it's buffers wouldn't go into a black hole.
Subversion isn't a Mac specific product... I wouldn't expect it to
use Mac specific APIs, especially since it's not doing anything wrong.
> Any suggestions? Thanks!
You could write Metrowerks a bug report, but I wouldn't expect much
of it. They publicly announced CW 10 will be the final release of the
product and they will not be supporting Mac OS X on Intel. As Apple
stated at WWDC, you'll need to move to Xcode to continue developing
for the Mac.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Tue Aug 2 05:44:02 2005