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

pre-revprop-change hook executed twice by mod_dav_svn

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.6.x
    • ---
    • mod_dav_svn
    • None

    Description

      If the pre-revprop-change hook script blocks the change, then mod_dav_svn tries
      to set the property back to it's original value, and it calls the hook script
      again for this (with the old property value).
      
      Expected behaviour:  If the pre-revprop-change script blocks the change, then
      mod_dav_svn shouldn't even try to revert it as the revert is a no-op.  (For DAV
      transactions with multiple prop changes, if one of them fails then it shouldn't
      be asking the pre-revprop-change hook scripts for permission to do the reverts,
      it should just do the revert anyway and call the post-revprop-change script).
      
      Causes:
      
      - subversion/mod_dav_svn/deadprops.c:db_apply_rollback() passes TRUE as the
      use_pre_revprop_change_hook parameter to svn_repos_fs_change_rev_prop3().  It
      should be FALSE in the revert case.
      
      - httpd/modules/dav/main/props.c:dav_prop_exec() doesn't remove the rollback
      item if the property change fails.  Therefore we "revert" changes that never
      happened.
      
      Confirmation:
      http://mail-archives.apache.org/mod_mbox/subversion-dev/200912.mbox/raw/%3C87my20m69f.fsf@stat.home.lan%3E
      
      I was asked to file this bug by C. Michael Pilato.
      

      Original issue reported by jonfoster

      Attachments

        1. 1_demo1.sh
          1 kB
          Subversion Importer

        Issue Links

          Activity

            People

              Unassigned Unassigned
              subversion-importer Subversion Importer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: