•  
      request #21755 Always deploy SVN post commit hook even if SVN tracking is disabled
    Infos
    #21755
    Thomas Gerbet (tgerbet)
    2021-06-03 11:44
    2021-06-02 16:00
    23346
    Details
    Always deploy SVN post commit hook even if SVN tracking is disabled

    The SVN post commit hook which deals with things like email notification is only deployed if a project has the "SVN tracking" enabled.

    It does not make sense at all for SVN plugin repositories where the notion of SVN tracking does not exist and even for SVN core repository it's weird to loose the notifications if the SVN tracking is disabled. The SVN core repositories post commit hook already verifies if the tracking needs to be updated or not so we should always deploy the hook.

    # src/utils/svn/commit-email.pl
    # Now add the Subversion information in the Codendi tracking database
    if (&isGroupSvnTracked) {
      $commit_id = db_get_commit($group_id,$repos,$rev,$unix_gmtime,$codexuid,@log_for_db);
    
      for $file (@changed_files) {
        print STDERR "file_path = ".$file->{'path'}."\n" if $debug;
        print STDERR "file_state = ".$file->{'state'}."\n" if $debug;
        ($filename,$dir,$suffix) = fileparse($file->{'path'},());
        db_add_record($file->{'state'},$commit_id,$repos,$dir,$filename,0,0);
      }
    }
    
    # src/utils/group.pl
    sub isGroupSvnTracked {
      return $$GROUP_INFO{'svn_tracker'};
    }
    
    SCM/Subversion
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2021-06-03
    Attachments
    Empty
    References

    Follow-ups