diff --git a/SourceSFSVN/SourceSFSVN.php b/SourceSFSVN/SourceSFSVN.php index 414a6d6..37df6ca 100644 --- a/SourceSFSVN/SourceSFSVN.php +++ b/SourceSFSVN/SourceSFSVN.php @@ -113,6 +113,7 @@ $t_standard_repo = isset( $p_repo->info['standard_repo'] ) ? $p_repo->info['standard_repo'] : ''; $t_trunk_path = isset( $p_repo->info['trunk_path'] ) ? $p_repo->info['trunk_path'] : ''; $t_branch_path = isset( $p_repo->info['branch_path'] ) ? $p_repo->info['branch_path'] : ''; + $t_tag_path = isset( $p_repo->info['tag_path'] ) ? $p_repo->info['tag_path'] : ''; $t_ignore_paths = isset( $p_repo->info['ignore_paths'] ) ? $p_repo->info['ignore_paths'] : ''; ?> @@ -141,6 +142,10 @@ > + + + +> /> @@ -158,6 +163,7 @@ $p_repo->info['standard_repo'] = gpc_get_bool( 'standard_repo', false ); $p_repo->info['trunk_path'] = gpc_get_string( 'trunk_path' ); $p_repo->info['branch_path'] = gpc_get_string( 'branch_path' ); + $p_repo->info['tag_path'] = gpc_get_string( 'tag_path' ); $p_repo->info['ignore_paths'] = gpc_get_bool( 'ignore_paths', false ); return $p_repo; @@ -272,6 +278,7 @@ $t_trunk_path = $p_repo->info['trunk_path']; $t_branch_path = $p_repo->info['branch_path']; + $t_tag_path = $p_repo->info['tag_path']; $t_ignore_paths = $p_repo->info['ignore_paths']; foreach( $p_svnlog as $t_line ) { @@ -330,6 +337,10 @@ } else if ( !is_blank( $t_branch_path ) && preg_match( '@^' . $t_branch_path . '([^\/]+)@i', $t_file->filename, $t_matches ) ) { $t_changeset->branch = $t_matches[1]; + # Look for non-standard tag path + } else if ( !is_blank( $t_tag_path ) && preg_match( '@^' . $t_tag_path . '([^\/]+)@i', $t_file->filename, $t_matches ) ) { + $t_changeset->branch = $t_matches[1]; + # Fall back to just using the root folder as the branch name } else if ( !$t_ignore_paths && preg_match( '/\/([^\/]+)/', $t_file->filename, $t_matches ) ) { $t_changeset->branch = $t_matches[1]; diff --git a/SourceSFSVN/lang/strings_english.txt b/SourceSFSVN/lang/strings_english.txt index dc46f85..85a0399 100644 --- a/SourceSFSVN/lang/strings_english.txt +++ b/SourceSFSVN/lang/strings_english.txt @@ -22,6 +22,7 @@ $s_plugin_SourceSFSVN_standard_repo = 'Standard Repository
(trunk/branches/tags)'; $s_plugin_SourceSFSVN_trunk_path = 'Trunk Path
(Non-standard repository)'; $s_plugin_SourceSFSVN_branch_path = 'Branch Path
(Non-standard repository)'; +$s_plugin_SourceSFSVN_tag_path = 'Tag Path
(Non-standard repository)'; $s_plugin_SourceSFSVN_ignore_paths = 'Ignore Other Paths
(Non-standard repository)'; $s_plugin_SourceSFSVN_configuration = 'Configuration'; diff --git a/SourceWebSVN/SourceWebSVN.php b/SourceWebSVN/SourceWebSVN.php index bdf81eb..164a227 100644 --- a/SourceWebSVN/SourceWebSVN.php +++ b/SourceWebSVN/SourceWebSVN.php @@ -114,6 +114,7 @@ $t_standard_repo = isset( $p_repo->info['standard_repo'] ) ? $p_repo->info['standard_repo'] : ''; $t_trunk_path = isset( $p_repo->info['trunk_path'] ) ? $p_repo->info['trunk_path'] : ''; $t_branch_path = isset( $p_repo->info['branch_path'] ) ? $p_repo->info['branch_path'] : ''; + $t_tag_path = isset( $p_repo->info['tag_path'] ) ? $p_repo->info['tag_path'] : ''; $t_ignore_paths = isset( $p_repo->info['ignore_paths'] ) ? $p_repo->info['ignore_paths'] : ''; ?> @@ -150,6 +151,10 @@ > + + + +> /> @@ -169,6 +174,7 @@ $p_repo->info['standard_repo'] = gpc_get_bool( 'standard_repo', false ); $p_repo->info['trunk_path'] = gpc_get_string( 'trunk_path' ); $p_repo->info['branch_path'] = gpc_get_string( 'branch_path' ); + $p_repo->info['tag_path'] = gpc_get_string( 'tag_path' ); $p_repo->info['ignore_paths'] = gpc_get_bool( 'ignore_paths', false ); return $p_repo; @@ -283,6 +289,7 @@ $t_trunk_path = $p_repo->info['trunk_path']; $t_branch_path = $p_repo->info['branch_path']; + $t_tag_path = $p_repo->info['tag_path']; $t_ignore_paths = $p_repo->info['ignore_paths']; foreach( $p_svnlog as $t_line ) { @@ -341,6 +348,10 @@ } else if ( !is_blank( $t_branch_path ) && preg_match( '@^' . $t_branch_path . '([^\/]+)@i', $t_file->filename, $t_matches ) ) { $t_changeset->branch = $t_matches[1]; + # Look for non-standard tag path + } else if ( !is_blank( $t_tag_path ) && preg_match( '@^' . $t_tag_path . '([^\/]+)@i', $t_file->filename, $t_matches ) ) { + $t_changeset->branch = $t_matches[1]; + # Fall back to just using the root folder as the branch name } else if ( !$t_ignore_paths && preg_match( '/\/([^\/]+)/', $t_file->filename, $t_matches ) ) { $t_changeset->branch = $t_matches[1]; diff --git a/SourceWebSVN/lang/strings_english.txt b/SourceWebSVN/lang/strings_english.txt index d32e2be..103e95b 100644 --- a/SourceWebSVN/lang/strings_english.txt +++ b/SourceWebSVN/lang/strings_english.txt @@ -24,6 +24,7 @@ $s_plugin_SourceWebSVN_standard_repo = 'Standard Repository
(trunk/branches/tags)'; $s_plugin_SourceWebSVN_trunk_path = 'Trunk Path
(Non-standard repository)'; $s_plugin_SourceWebSVN_branch_path = 'Branch Path
(Non-standard repository)'; +$s_plugin_SourceWebSVN_tag_path = 'Tag Path
(Non-standard repository)'; $s_plugin_SourceWebSVN_ignore_paths = 'Ignore Other Paths
(Non-standard repository)'; $s_plugin_SourceWebSVN_configuration = 'Configuration';