Changeset 13709
- Timestamp:
- 05/16/2024 01:30:50 AM (4 months ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 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 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-svn.php
r11918 r13709 403 403 foreach ( $simple_xml->logentry as $entry ) { 404 404 $revision = (int) $entry->attributes()['revision']; 405 $actions = array(); 405 406 $paths = array(); 406 407 407 408 foreach ( $entry->paths->children() as $child_path ) { 408 $paths[] = (string) $child_path; 409 $path = (string) $child_path; 410 $action = (string) ( $child_path->attributes()['action'] ?? 'M' ); 411 412 $paths[] = $path; 413 $actions[ $path ] = $action; 409 414 } 410 415 … … 414 419 'date' => strtotime( (string) $entry->date ), 415 420 'paths' => $paths, 421 'actions' => $actions, 416 422 'message' => (string) $entry->msg, 417 423 );
Note: See TracChangeset
for help on using the changeset viewer.