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

Editor contract question

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-12-02 00:27:37 CET

libsvn_repos/delta.c:delete() invokes editor->delete_entry with an
invalid revision argument:

  return c->editor->delete_entry (edit_path (c, path), SVN_INVALID_REVNUM,
                                  dir_baton, pool);

The documentation for delete_entry is:

     Remove the directory entry named PATH, a child of the directory
     represented by PARENT_BATON. REVISION is used as a sanity check
     to ensure that you are removing the revision of PATH that you
     really think you are.

There is no mention that REVISION can be invalid if the sanity check
is not required, so when I wrote my ra_svn code, I didn't make
allowances for passing an invalid revision.

Should I allow sanity-check revisions to be invalid (presumably in
open_directory and open_file as well as delete_entry) and change the
svn_delta documentation to match? Or should we go to extra effort to
find the entry we're deleting in delta_dirs()? (I think extra effort
is necessary; all we have is an entry name and a node ID.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 2 00:28:22 2002

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