Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust the relative source file path when indexing sources in a multi… #15029

Merged
merged 7 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,18 @@ function New-TfsGitSrcSrvIniContent {
# Make the sources root path end with a trailing slash.
$sourcesRootPath = $provider.SourcesRootPath.TrimEnd('\')
$sourcesRootPath = "$sourcesRootPath\"
$isMultiRepoCheckout = !(Test-Path "${sourcesRootPath}.git")
foreach ($sourceFilePath in $SourceFilePaths) {
[string]$relativeSourceFilePath = $sourceFilePath.Substring($sourcesRootPath.Length)
if ($isMultiRepoCheckout) {
$i = $relativeSourceFilePath.IndexOf('\')
if ($i -gt 0) {
$repoName = $relativeSourceFilePath.Substring(0, $i)
if (Test-Path "${sourcesRootPath}$repoName\.git") {
$relativeSourceFilePath = $relativeSourceFilePath.Substring($i + 1)
}
}
}
$relativeSourceFilePath = $relativeSourceFilePath.Replace('\', '/')
$relativeSourceFilePath = "/$relativeSourceFilePath"
"$sourceFilePath*TFS_COLLECTION*TFS_TEAM_PROJECT*TFS_REPO*TFS_COMMIT*TFS_SHORT_COMMIT*$relativeSourceFilePath*TFS_APPLY_FILTERS"
MarkKharitonov marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PublishSymbolsV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"preview": false,
"version": {
"Major": 2,
"Minor": 172,
"Minor": 190,
"Patch": 0
},
"minimumAgentVersion": "1.95.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PublishSymbolsV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"preview": false,
"version": {
"Major": 2,
"Minor": 172,
"Minor": 190,
"Patch": 0
},
"minimumAgentVersion": "1.95.0",
Expand Down