Closed RishabhJoling closed 3 years ago
You'll need to tell it exactly which changed files to reshelve.
Basically the task replaces the shelveset prior to completing the build.
In theory the shelveset could also have fewer files, or you can pend deletions etc.
In general it's ok to just update **/*
as long as your tfignore files are in order.
I can see it could be more logical to merge the two shelveset, but that's not how tfvc works. To update the existing set, you unshelve it into the workspace and then make more changes and then create a new shelveset with the exact same name and owner.
Really appreciate your prompt response. Is it possible to raise new feature request to fullfil the requirement as merging the pending changes along with the existing shelveset?
Raising the request can... But I don't really know exactly how it should function under all circumstances nor do I know whether it's possible for all cases.
What's keeping you from using **/*
?
To update the shelveset with only specific changes, I'd have to clone the workspace, unshelve the shelveset, copy the changes over, create a new shelveset out of that. It would be a time-costly process and has a large chance the initial implementations would be buggy.
I'd be open to a pull request though.
Thanks for giving directions on using */. We never used tfignore fie, considering we do have 400+ project branches, it will be tedious to add the tfsignore file. Same time we understand your concern on implemeting new feature with complexities and stability issue of the initial version. Would you recommend any other alternate to achieve our requirement?
Hello Jesse,
We have tried using "*/" for file changes however we are getting below exception :
Input to Files to update: $(Build.SourceDirectory)/projectFolderName/**/*
Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11\**' is not found or not supported. Type or select a different path."
Input to Files to update : **/*
##[error]Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path '**' is not found or not supported. Type or select a different path."
**Below is error log :**
##[debug]Evaluating condition for step: 'Update gated changes'
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> True
##[debug]Result: True
##[section]Starting: Update gated changes
==============================================================================
Task : TFVC - Update gated changes
Description : Updates the gated changes with the local workspace prior to checking in.
Version : 2.2.17
Author : Jesse Houwing
Help : [More Information](https://github.com/jessehouwing/azure-pipelines-tfvc-tasks/wiki/Shelve)
==============================================================================
##[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
##[debug]Entering script TfvcUpdateShelveset.v3.ps1
##[debug]INPUT_ITEMSPEC: 'C:\Agents\1\52\s/Business.Services.Named/Completions/Releases/Completions_Version_2.11/**/*'
##[debug]INPUT_RECURSION: 'None'
##[debug]INPUT_SKIPNONGATED: 'true'
##[debug] Converted to bool: True
##[debug]INPUT_AUTODETECTADDS: 'false'
##[debug] Converted to bool: False
##[debug]INPUT_AUTODETECTDELETES: 'false'
##[debug] Converted to bool: False
##[debug]Loading module from path 'C:\Agents\1\_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\ps_modules\VstsTfvcShared\VstsTfvcShared.psm1'.
##[debug]Loading module from path 'C:\Agents\1\_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\ps_modules\VstsTfvcShared\TlsHelper\TlsHelper.psm1'.
##[debug]Loading resource strings from: C:\Agents\1\_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\ps_modules\VstsTfvcShared\TlsHelper/module.json
##[debug]Loaded 3 strings.
##[debug]SYSTEM_CULTURE: 'en-US'
##[debug]Loading resource strings from: C:\Agents\1\_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\ps_modules\VstsTfvcShared\TlsHelper\Strings\resources.resjson\en-US\resources.resjson
##[debug]Loaded 3 strings.
##[debug]Exporting function 'Add-Tls12InSession'.
##[debug]Exporting function 'Assert-TlsError'.
##[debug]Importing function 'Add-Tls12InSession'.
##[debug]Importing function 'Assert-TlsError'.
Added TLS 1.2 in session.
##[debug]Setting default assembly locations
##[debug]Found Visual Studio 2017 or newer.
##[debug]Trying: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Newtonsoft.Json.dll
##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Newtonsoft.Json.dll
##[debug]Setting default assembly locations
##[debug]Found Visual Studio 2017 or newer.
##[debug]Trying: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Client.dll
##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Client.dll
##[debug]Setting default assembly locations
##[debug]Found Visual Studio 2017 or newer.
##[debug]Trying: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Common.dll
##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Common.dll
##[debug]Setting default assembly locations
##[debug]Found Visual Studio 2017 or newer.
##[debug]Trying: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Client.dll
##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Client.dll
##[debug]Setting default assembly locations
##[debug]Found Visual Studio 2017 or newer.
##[debug]Trying: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.WorkItemTracking.Client.dll
##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.WorkItemTracking.Client.dll
##[debug]Setting default assembly locations
##[debug]Found Visual Studio 2017 or newer.
##[debug]Trying: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Diff.dll
##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Diff.dll
##[debug]Exporting function 'Write-Message'.
##[debug]Exporting function 'Invoke-DisposeSourceProvider'.
##[debug]Exporting function 'Get-SourceProvider'.
##[debug]Exporting function 'AutoPend-WorkspaceChanges'.
##[debug]Exporting function 'Convert-ToItemSpecs'.
##[debug]Exporting function 'Find-VisualStudio'.
##[debug]The 'AutoPend-WorkspaceChanges' command in the VstsTfvcShared' module was imported, but because its name does not include an approved verb, it might be difficult to find. For a list of approved verbs, type Get-Verb.
##[debug]Importing function 'AutoPend-WorkspaceChanges'.
##[debug]Importing function 'Convert-ToItemSpecs'.
##[debug]Importing function 'Find-VisualStudio'.
##[debug]Importing function 'Get-SourceProvider'.
##[debug]Importing function 'Invoke-DisposeSourceProvider'.
##[debug]Importing function 'Write-Message'.
##[debug]Importing modules
##[debug]Entering script TfvcUpdateShelveset.v3.ps1
##[debug]Entering Get-SourceProvider
##[debug]SYSTEM_TEAMFOUNDATIONCOLLECTIONURI: 'http://{removed-security-purpose}:8080/tfs/MainCollection/'
##[debug]Found Visual Studio 2017 or newer.
##[debug]Entering Get-VstsTfsClientCredentials.
##[debug] OMDirectory: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\'
##[debug]ENDPOINT_URL_SystemVssConnection: 'http://{removed-security-purpose}:8080/tfs/MainCollection/'
##[debug]ENDPOINT_AUTH_SystemVssConnection: '********'
##[debug]ENDPOINT_DATA_SystemVssConnection (empty)
##[debug]Testing file path: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Newtonsoft.Json.dll'
##[debug]Adding assembly resolver.
##[debug]Entering Get-OMType.
##[debug] TypeName: 'Microsoft.TeamFoundation.Client.TfsClientCredentials'
##[debug] OMKind: 'ExtendedClient'
##[debug] OMDirectory: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\'
##[debug] Require: 'True'
##[debug]Testing whether type can be loaded: 'Microsoft.TeamFoundation.Client.TfsClientCredentials'
##[debug]The type was loaded successfully.
##[debug]Leaving Get-OMType.
##[debug]Leaving Get-VstsTfsClientCredentials.
##[debug]Unable to determine workspace from source folder: C:\Agents\1\52\s
##[debug]Attempting to resolve workspace recursively from locally cached info.
##[debug]Cached workspace info discovered. Server URI: http://{removed-security-purpose}:8080/tfs/MainCollection/ ; Name: ws_52_3 ; Owner Name: 2ea5313c-7020-443d-86af-90389324e0de
##[debug]Leaving Get-SourceProvider
##[debug]BUILD_SOURCETFVCSHELVESET: 'Gated_2021-02-19_09.32.25.3594;{valid username removed-security-purpose}'
##[debug]BUILD_BUILDID: '33930'
##[debug]Entering Invoke-DisposeSourceProvider
##[debug]Disposing tfsTeamProjectCollection
##[debug]Leaving Invoke-DisposeSourceProvider
##[debug]Caught exception from task script.
##[debug]Error record:
##[debug]C:\Agents\1\_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\TfvcUpdateShelveset.v3.ps1 : Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11\**' is not found or not supported. Type or select a different path."
##[debug]At line:1 char:1
##[debug]+ . 'C:\Agents\1\_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba02 ...
##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##[debug] + CategoryInfo : NotSpecified: (:) [TfvcUpdateShelveset.v3.ps1], MethodInvocationException
##[debug] + FullyQualifiedErrorId : InvalidPathException,TfvcUpdateShelveset.v3.ps1
##[debug]
##[debug]Script stack trace:
##[debug]at <ScriptBlock>, C:\Agents\1\_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\TfvcUpdateShelveset.v3.ps1: line 49
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]at <ScriptBlock>, <No file>: line 22
##[debug]at <ScriptBlock>, <No file>: line 18
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]Exception:
##[debug]System.Management.Automation.MethodInvocationException: Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11\**' is not found or not supported. Type or select a different path." ---> Microsoft.TeamFoundation.InvalidPathException: TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11\**' is not found or not supported. Type or select a different path. ---> System.ArgumentException: Illegal characters in path.
##[debug] at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
##[debug] at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
##[debug] at Microsoft.TeamFoundation.Common.FileSpec.GetFullPathWrapper(String path)
##[debug] --- End of inner exception stack trace ---
##[debug] at Microsoft.TeamFoundation.Common.FileSpec.GetFullPathWrapper(String path)
##[debug] at Microsoft.TeamFoundation.Common.FileSpec.GetFullPath(String path, Boolean checkForIllegalDollar)
##[debug] at Microsoft.TeamFoundation.VersionControl.Common.VersionControlUtil.GetFullPath(String item, PathLength maxServerPathLength)
##[debug] at Microsoft.TeamFoundation.VersionControl.Client.ItemSpec..ctor(String item, RecursionType recursionType, Int32 deletionId)
##[debug] at Microsoft.TeamFoundation.VersionControl.Client.ItemSpec.FromStrings(String[] paths, RecursionType recursion)
##[debug] at Microsoft.TeamFoundation.VersionControl.Client.Workspace.GetPendingChanges(String[] items, RecursionType recursion, Boolean includeDownloadInfo)
##[debug] at CallSite.Target(Closure , CallSite , Object , String[] , Object )
##[debug] --- End of inner exception stack trace ---
##[debug] at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
##[debug] at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
##[debug] at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
##[debug] at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
##[debug] at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
##[debug] at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
##[debug] at System.Management.Automation.CommandProcessorBase.Complete()
##[error]Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11\**' is not found or not supported. Type or select a different path."
##[debug]Processed: ##vso[task.logissue type=error]Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11\**' is not found or not supported. Type or select a different path."
##[debug]Processed: ##vso[task.complete result=Failed]
##[section]Finishing: Update gated changes
*
may do. It's been to long I've had to type tfvc commands by hand. It
uses the same parameters as tf vc shelveset /replace
.
On Fri, Feb 19, 2021, 16:08 Rishabh Joling notifications@github.com wrote:
Hello Jesse,
We have tried using "*/" for file changes however we are getting below exception :
Input to Files to update: $(Build.SourceDirectory)/projectFolderName/*/ Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11**' is not found or not supported. Type or select a different path."
Input to Files to update : */ ##[error]Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path '*' is not found or not supported. Type or select a different path." Below is error log :*
[debug]Evaluating condition for step: 'Update gated changes'
[debug]Evaluating: succeeded()
[debug]Evaluating succeeded:
[debug]=> True
[debug]Result: True
[section]Starting: Update gated changes Task : TFVC - Update gated
changes Description : Updates the gated changes with the local workspace prior to checking in. Version : 2.2.17 Author : Jesse Houwing Help : More Information https://github.com/jessehouwing/azure-pipelines-tfvc-tasks/wiki/Shelve
[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
[debug]Entering script TfvcUpdateShelveset.v3.ps1
[debug]INPUT_ITEMSPEC:
'C:\Agents\1\52\s/Business.Services.Named/Completions/Releases/Completions_Version_2.11/
/' ##[debug]INPUT_RECURSION: 'None' ##[debug]INPUT_SKIPNONGATED: 'true'
[debug] Converted to bool: True ##[debug]INPUT_AUTODETECTADDS: 'false'
[debug] Converted to bool: False ##[debug]INPUT_AUTODETECTDELETES:
'false' ##[debug] Converted to bool: False ##[debug]Loading module from path 'C:\Agents\1_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\ps_modules\VstsTfvcShared\VstsTfvcShared.psm1'.
[debug]Loading module from path
'C:\Agents\1_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\ps_modules\VstsTfvcShared\TlsHelper\TlsHelper.psm1'.
[debug]Loading resource strings from:
C:\Agents\1_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\ps_modules\VstsTfvcShared\TlsHelper/module.json
[debug]Loaded 3 strings. ##[debug]SYSTEM_CULTURE: 'en-US'
[debug]Loading resource strings from:
C:\Agents\1_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\ps_modules\VstsTfvcShared\TlsHelper\Strings\resources.resjson\en-US\resources.resjson
[debug]Loaded 3 strings. ##[debug]Exporting function
'Add-Tls12InSession'. ##[debug]Exporting function 'Assert-TlsError'.
[debug]Importing function 'Add-Tls12InSession'. ##[debug]Importing
function 'Assert-TlsError'. Added TLS 1.2 in session. ##[debug]Setting default assembly locations ##[debug]Found Visual Studio 2017 or newer.
[debug]Trying: C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Newtonsoft.Json.dll ##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Newtonsoft.Json.dll ##[debug]Setting default assembly locations
[debug]Found Visual Studio 2017 or newer. ##[debug]Trying: C:\Program
Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Client.dll ##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Client.dll ##[debug]Setting default assembly locations ##[debug]Found Visual Studio 2017 or newer.
[debug]Trying: C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Common.dll ##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Common.dll ##[debug]Setting default assembly locations ##[debug]Found Visual Studio 2017 or newer.
[debug]Trying: C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Client.dll
[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Client.dll
[debug]Setting default assembly locations ##[debug]Found Visual Studio
2017 or newer. ##[debug]Trying: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.WorkItemTracking.Client.dll
[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.WorkItemTracking.Client.dll
[debug]Setting default assembly locations ##[debug]Found Visual Studio
2017 or newer. ##[debug]Trying: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Diff.dll ##[debug]Loading assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Diff.dll ##[debug]Exporting function 'Write-Message'. ##[debug]Exporting function 'Invoke-DisposeSourceProvider'. ##[debug]Exporting function 'Get-SourceProvider'. ##[debug]Exporting function 'AutoPend-WorkspaceChanges'. ##[debug]Exporting function 'Convert-ToItemSpecs'. ##[debug]Exporting function 'Find-VisualStudio'.
[debug]The 'AutoPend-WorkspaceChanges' command in the VstsTfvcShared'
module was imported, but because its name does not include an approved verb, it might be difficult to find. For a list of approved verbs, type Get-Verb. ##[debug]Importing function 'AutoPend-WorkspaceChanges'.
[debug]Importing function 'Convert-ToItemSpecs'. ##[debug]Importing
function 'Find-VisualStudio'. ##[debug]Importing function 'Get-SourceProvider'. ##[debug]Importing function 'Invoke-DisposeSourceProvider'. ##[debug]Importing function 'Write-Message'. ##[debug]Importing modules ##[debug]Entering script TfvcUpdateShelveset.v3.ps1 ##[debug]Entering Get-SourceProvider
[debug]SYSTEM_TEAMFOUNDATIONCOLLECTIONURI:
'http://{removed-security-purpose}:8080/tfs/MainCollection/' ##[debug]Found Visual Studio 2017 or newer. ##[debug]Entering Get-VstsTfsClientCredentials. ##[debug] OMDirectory: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer' ##[debug]ENDPOINT_URL_SystemVssConnection: 'http://{removed-security-purpose}:8080/tfs/MainCollection/'
[debug]ENDPOINT_AUTH_SystemVssConnection: '***'
[debug]ENDPOINT_DATA_SystemVssConnection (empty)
[debug]Testing file path: 'C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Newtonsoft.Json.dll'
[debug]Adding assembly resolver.
[debug]Entering Get-OMType.
[debug] TypeName: 'Microsoft.TeamFoundation.Client.TfsClientCredentials'
[debug] OMKind: 'ExtendedClient'
[debug] OMDirectory: 'C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer'
[debug] Require: 'True'
[debug]Testing whether type can be loaded:
'Microsoft.TeamFoundation.Client.TfsClientCredentials'
[debug]The type was loaded successfully.
[debug]Leaving Get-OMType.
[debug]Leaving Get-VstsTfsClientCredentials.
[debug]Unable to determine workspace from source folder: C:\Agents\1\52\s
[debug]Attempting to resolve workspace recursively from locally cached
info.
[debug]Cached workspace info discovered. Server URI: http://{removed-security-purpose}:8080/tfs/MainCollection/
; Name: ws_52_3 ; Owner Name: 2ea5313c-7020-443d-86af-90389324e0de
[debug]Leaving Get-SourceProvider
[debug]BUILD_SOURCETFVCSHELVESET: 'Gated_2021-02-19_09.32.25.3594;{valid
username removed-security-purpose}'
[debug]BUILD_BUILDID: '33930'
[debug]Entering Invoke-DisposeSourceProvider
[debug]Disposing tfsTeamProjectCollection
[debug]Leaving Invoke-DisposeSourceProvider
[debug]Caught exception from task script.
[debug]Error record:
[debug]C:\Agents\1_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\TfvcUpdateShelveset.v3.ps1
: Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11*
*' is not found or not supported. Type or select a different path."
[debug]At line:1 char:1 ##[debug]+ .
'C:\Agents\1_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba02 ... ##[debug]+
##[debug] + CategoryInfo : NotSpecified: (:) [TfvcUpdateShelveset.v3.ps1], MethodInvocationException ##[debug] + FullyQualifiedErrorId : InvalidPathException,TfvcUpdateShelveset.v3.ps1 ##[debug] ##[debug]Script stack trace: ##[debug]at , C:\Agents\1_tasks\tf-vc-shelveset-update_7164ddbc-7979-4e2c-a2f8-e7a89b6ba026\2.2.17\TfvcUpdateShelveset.v3.ps1: line 49 ##[debug]at , : line 1 ##[debug]at , : line 22 ##[debug]at , : line 18 ##[debug]at , : line 1 ##[debug]Exception: ##[debug]System.Management.Automation.MethodInvocationException: Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11**' is not found or not supported. Type or select a different path." ---> Microsoft.TeamFoundation.InvalidPathException: TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11* *' is not found or not supported. Type or select a different path. ---> System.ArgumentException: Illegal characters in path. ##[debug] at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath) ##[debug] at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath) ##[debug] at Microsoft.TeamFoundation.Common.FileSpec.GetFullPathWrapper(String path) ##[debug] --- End of inner exception stack trace --- ##[debug] at Microsoft.TeamFoundation.Common.FileSpec.GetFullPathWrapper(String path) ##[debug] at Microsoft.TeamFoundation.Common.FileSpec.GetFullPath(String path, Boolean checkForIllegalDollar) ##[debug] at Microsoft.TeamFoundation.VersionControl.Common.VersionControlUtil.GetFullPath(String item, PathLength maxServerPathLength) ##[debug] at Microsoft.TeamFoundation.VersionControl.Client.ItemSpec..ctor(String item, RecursionType recursionType, Int32 deletionId) ##[debug] at Microsoft.TeamFoundation.VersionControl.Client.ItemSpec.FromStrings(String[] paths, RecursionType recursion) ##[debug] at Microsoft.TeamFoundation.VersionControl.Client.Workspace.GetPendingChanges(String[] items, RecursionType recursion, Boolean includeDownloadInfo) ##[debug] at CallSite.Target(Closure , CallSite , Object , String[] , Object ) ##[debug] --- End of inner exception stack trace --- ##[debug] at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) ##[debug] at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) ##[debug] at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) ##[debug] at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) ##[debug] at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess) ##[debug] at System.Management.Automation.PSScriptCmdlet.DoEndProcessing() ##[debug] at System.Management.Automation.CommandProcessorBase.Complete() ##[error]Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11**' is not found or not supported. Type or select a different path." ##[debug]Processed: ##vso[task.logissue type=error]Exception calling "GetPendingChanges" with "2" argument(s): "TF10121: The path 'C:\Agents\1\52\s\Business.Services.Named\Completions\Releases\Completions_Version_2.11**' is not found or not supported. Type or select a different path." ##[debug]Processed: ##vso[task.complete result=Failed] ##[section]Finishing: Update gated changes — You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/jessehouwing/azure-pipelines-tfvc-tasks/issues/102#issuecomment-782132979>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA724S63S34NTD5E4S3CFR3S7Z5FBANCNFSM4XY2CXDQ> .
Hi @jessehouwing,
Meantime, talking about the solution to do actual merging, please find whether below solution would work it out.
Anyway as part of this pipeline process, already all the codes has been unshelved to local copy, only part is we need to get the list of the files from the shelveset, and append it with the variable [string[]] $FilesToCheckin
. and then rest would be working as expected right?
That might work. But remember, deletions and renames and merges should work as well, there can be a whole range of pending changes.
And both server paths and local paths should work.
Instead of **/*
, try *
and recursion: Full
that should do the trick.
If needed $(build.sourcesdirectory)\*
.
The fact that one can't use standard glob patterns is super confusing. Sorry about that. It has to do with the fact that the pattern must also match local and server paths as well as deleted and renamed files.
Hi @jessehouwing, We tried with $(build.sourcesdirectory)* Merge/Add/Delete all works as expected. Thank you so much for your help on this case. We can close this issue.
Yay!
Hello Jessa,
Background : We are trying to update the AssemblyInfo.cs file changes into the gated check-in, while building the solution as part of the pipeline & want to check-in this updated assemblyInfo file into Source.
Issue While using "TFVC - Update gated changes" task (both V1 & v2), we are not getting any errors as all the tasks are succeesfully completed however pending changes are replaced the original Gated Check-in, instead of append. When we verify the checked-in changeset, we lost all the original gated changes.
Could you please explain why this replace behaviour happening instead of append? Are we missing something here?
Scenario Using "TFVC - Update gated changes", passing the path of modified "AssemblyInfo.cs" for the parameter "Files to Update" Recursion "Full" Enabled "Skip on non-gated build"
Thanks