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

Change #1: New editor creation/finishing methods

From: Ben Collins-Sussman <sussman_at_newton.collab.net>
Date: 2001-01-20 03:15:17 CET

Change #1: New editor creation/finishing methods

Status Quo:

   When created, an {editor, edit_baton} are returned to the editor's
   driver. The first call is always replace_root(), and when
   finished, the driver calls close_edit().

Proposed Change:

   When created, an editor and root_dir_baton are returned. It is
   already presumed that a change is going to be made below root_dir.
   When the edit is finished, we call close_dir(root_dir_baton).

   Thus replace_root() and close_edit() no longer exist in the editor
   interface.

Rationale:

   This decision came out a heated debate about whether to allow
   multiple calls to replace_root(). It was decided that this was a
   bad idea; it's possible that two different calls to replace_root()
   might involve a file moving from one disjoint subtree to another
   one; thus the whole point of "not calculating the nearest parent
   dir of all replace_root() calls" was lost. Since we're going to
   have to calculate this parent anyway, then, we may as well clarify
   the interface.

   As the interface stands now, it's not particularly clear that
   replace_root() is meant to be called only once. Our proposed
   change clears this up; the directory you intend to replace is used
   to *generate* the editor, which hands back a root_dir_baton instead
   of an abstract "edit" baton. Simliarly, when you're done, you just
   close_dir() on this root_dir_baton. We already have replace_dir()
   and close_dir() -- why make special cases for the root directory?
Received on Sat Oct 21 14:36:19 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.