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

svn_apply_textdelta() in an update_editor and file handles

From: Ph. Marek <philipp.marek_at_bmlv.gv.at>
Date: 2006-06-09 06:59:49 CEST

Hello everybody!

I noticed that svn_apply_textdelta() and the work done until my update
editor's close_file() is different for different protocols.

If the repository is connected via file://, the filehandles given to
svn_apply_textdelta() are still open at the time my close_file() callback is
run; with svn+ssh:// they're closed.

Is that per design? Here are some of my reflections.

* I could simply ignore the filehandles - after all, they will surely be
  closed when the corresponding pool gets cleared.
  + Easy code code
  - Errors on close() (eg disk full) cannot be handled by me - so the whole
    editor would be aborted, no chance for recovery. (Is that so?)
* All protocols should close the filehandles
  + Easy client code
  - Whole editor is canceled.
  - Changes in svn
* All protocols should leave the filehandles open; if the client doesn't care,
  the pool clearing will close them.
  + Easy code for those who don't handle explicitly
  + Chance for recovery
  - Changes in svn

Clearly, I'd prefer the last option; but I'd like to hear other opinions
first.

BTW, I believe that errors *inside* the textdelta-parts always lead to a
cancellation of the editor - is that correct? What had to be done to
programmatically ignore some errors?

Thank you for your answers!

Regards,

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 9 06:59:57 2006

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.