You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Ph. Marek" <ph...@bmlv.gv.at> on 2006/06/09 04:59:49 UTC

svn_apply_textdelta() in an update_editor and file handles

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