Changeset 13709 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-svn-watcher.php
- Timestamp:
- 05/16/2024 01:30:50 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-svn-watcher.php
r8337 r13709 105 105 $plugins[ $plugin_slug ] = array( 106 106 'tags_touched' => array(), // trunk is a tag too! 107 'tags_deleted' => array(), 107 108 'readme_touched' => false, // minor optimization, only parse readme i18n on readme-related commits 108 109 'code_touched' => false, … … 116 117 $plugin['revisions'][] = $log['revision']; 117 118 foreach ( $log['paths'] as $path ) { 118 $path_parts = explode( '/', trim( $path, '/' ) ); 119 $path_parts = explode( '/', trim( $path, '/' ) ); 120 $is_deletion = ( isset( $log['actions'][ $path ] ) && 'D' === $log['actions'][ $path ] ); 119 121 120 122 if ( ! isset( $path_parts[1] ) ) { 121 123 continue; 122 124 } 123 125 124 126 if ( 'trunk' == $path_parts[1] ) { 125 127 $plugin['tags_touched'][] = 'trunk'; 126 128 127 129 } elseif ( 'tags' == $path_parts[1] && isset( $path_parts[2] ) ) { 128 $plugin['tags_touched'][] = $path_parts[2]; 130 if ( $is_deletion && ! isset( $path_parts[3] ) /* not a file deletion */ ) { 131 $plugin['tags_deleted'][] = $path_parts[2]; 132 } else { 133 $plugin['tags_touched'][] = $path_parts[2]; 134 } 129 135 130 136 } elseif ( 'assets' == $path_parts[1] ) { 131 137 $plugin['assets_touched'] = true; 132 138 133 139 } 134 140 … … 141 147 } 142 148 } 149 143 150 $plugin['tags_touched'] = array_unique( $plugin['tags_touched'] ); 144 151 }
Note: See TracChangeset
for help on using the changeset viewer.