@@ -100,6 +100,7 @@ class RepositoryManager : IRepositoryManager
100
100
private readonly IProcessManager processManager ;
101
101
private readonly IRepositoryPathConfiguration repositoryPaths ;
102
102
private readonly IFileSystem fileSystem ;
103
+ private readonly CancellationToken token ;
103
104
private readonly IRepositoryWatcher watcher ;
104
105
105
106
private bool isBusy ;
@@ -116,11 +117,13 @@ class RepositoryManager : IRepositoryManager
116
117
public RepositoryManager ( IGitConfig gitConfig ,
117
118
IRepositoryWatcher repositoryWatcher , IGitClient gitClient ,
118
119
IProcessManager processManager ,
119
- IRepositoryPathConfiguration repositoryPaths ,
120
- IFileSystem fileSystem )
120
+ IFileSystem fileSystem ,
121
+ CancellationToken token ,
122
+ IRepositoryPathConfiguration repositoryPaths )
121
123
{
122
124
this . repositoryPaths = repositoryPaths ;
123
125
this . fileSystem = fileSystem ;
126
+ this . token = token ;
124
127
this . gitClient = gitClient ;
125
128
this . processManager = processManager ;
126
129
this . watcher = repositoryWatcher ;
@@ -129,7 +132,8 @@ public RepositoryManager(IGitConfig gitConfig,
129
132
SetupWatcher ( ) ;
130
133
}
131
134
132
- public static RepositoryManager CreateInstance ( IPlatform platform , ITaskManager taskManager , IGitClient gitClient , IProcessManager processManager , NPath repositoryRoot , IFileSystem fileSystem )
135
+ public static RepositoryManager CreateInstance ( IPlatform platform , ITaskManager taskManager , IGitClient gitClient ,
136
+ IProcessManager processManager , IFileSystem fileSystem , NPath repositoryRoot )
133
137
{
134
138
var repositoryPathConfiguration = new RepositoryPathConfiguration ( repositoryRoot ) ;
135
139
string filePath = repositoryPathConfiguration . DotGitConfig ;
@@ -138,7 +142,8 @@ public static RepositoryManager CreateInstance(IPlatform platform, ITaskManager
138
142
var repositoryWatcher = new RepositoryWatcher ( platform , repositoryPathConfiguration , taskManager . Token ) ;
139
143
140
144
return new RepositoryManager ( gitConfig , repositoryWatcher ,
141
- gitClient , processManager , repositoryPathConfiguration , fileSystem ) ;
145
+ gitClient , processManager , fileSystem ,
146
+ taskManager . Token , repositoryPathConfiguration ) ;
142
147
}
143
148
144
149
public void Initialize ( )
@@ -389,7 +394,7 @@ public void UpdateLocks()
389
394
390
395
private ITask HookupHandlers ( ITask task , bool isExclusive , bool filesystemChangesExpected )
391
396
{
392
- return new ActionTask ( CancellationToken . None , ( ) => {
397
+ return new ActionTask ( token , ( ) => {
393
398
if ( isExclusive )
394
399
{
395
400
Logger . Trace ( "Starting Operation - Setting Busy Flag" ) ;
0 commit comments