Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3137

Consistent 'Not Found' errors from RA layers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 1.6.0
    • libsvn_ra
    • None

    Description

      Different RA layers should use the same error code to signal the "path not
      found" error condition.
      
      Code like this appears in several places [1]:
      
      > err = editor->delete_entry(path, item->revision, parent_baton, pool);
      > if (err)
      >   {
      >     if (err->apr_err == SVN_ERR_FS_NOT_FOUND
      >         || err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND)
      
      These two errors both mean "the item was not present in the repository".
      
      SVN_ERR_FS_NOT_FOUND is sent by the file or svn RA layers, and
      SVN_ERR_RA_DAV_PATH_NOT_FOUND is sent by the http/https RA layers, with the
      same meaning.
      
      Similarly, there the problem is with
      
      > svn_ra_get_locations(svn_ra_session_t *session,
      >                      apr_hash_t **locations,
      >                      const char *path,
      >                      svn_revnum_t peg_revision,
      >                      apr_array_header_t *location_revisions,
      >                      apr_pool_t *pool)
      
      If PATH doesn't exist at PEG_REVISION:
      
      RA_LOCAL/RA_SVN: Returns SVN_ERR_FS_NOT_FOUND
      RA_NEON: Returns two SVN_ERR_RA_DAV_PATH_NOT_FOUND errors
      RA_SERF: Returns SVN_NO_ERROR, sets *LOCATIONS to an empty hash. [3]
      
      See email thread [2].  In that thread Karl suggests, "The fix(es) should happen
      as close to the original (server-side) source of the error as possible, IMHO." 
      Barring that, the fix should be in the
      particular RA implementation.
      
      [1] Email thread: <http://svn.haxx.se/dev/archive-2008-03/0135.shtml>.
      [2] Email thread: <http://svn.haxx.se/dev/archive-2007-12/0457.shtml>.
      [3] This is reckoned to be a bug: see email thread
      <http://svn.haxx.se/dev/archive-2008-03/0144.shtml>.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            julianfoad Julian Foad
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: