[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Adding empty files: change to svn_fs_make_file and documentation for the delta editor?

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2007-06-20 15:30:09 CEST

I agree with Karl, in that an editor drive of "open_file();
close_file()" is ambiguous, and that the editor implementation
shouldn't make any assumptions about a file being created or changed.
It should treat this sequence as a no-op.

But I also agree with David, that an editor drive of "add_file();
close_file()" should create an empty file. While open_file() means
"I'm about to do something to this file", I think the add_file() call
really means "create a file now". Various editors might have some
flexibility in their implementations, though. One editor might create
a 0-byte file immediately in add_file(), then append data to it if
apply_textdelta() is called. A different editor might do nothing
during add_file(), create *and* append data in apply_textdelta()...
or, if apply_textdelta() is never called, then close_file() would do
the work of creating the 0-byte file.

Either way, as long as "add_file(); close_file()" results in a 0-byte
file, things are fine.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 20 15:30:22 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.