Mercurial > hg > mercurial
annotate mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java @ 48:8665bfa3e03a
enable agent side checkout
author | Pavel.Sher |
---|---|
date | Thu, 09 Oct 2008 12:08:49 +0400 |
parents | c785bc4c5f39 |
children | ef24dd7c740e |
rev | line source |
---|---|
25 | 1 /* |
2 * Copyright 2000-2007 JetBrains s.r.o. | |
3 * | |
4 * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 * you may not use this file except in compliance with the License. | |
6 * You may obtain a copy of the License at | |
7 * | |
8 * http://www.apache.org/licenses/LICENSE-2.0 | |
9 * | |
10 * Unless required by applicable law or agreed to in writing, software | |
11 * distributed under the License is distributed on an "AS IS" BASIS, | |
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 * See the License for the specific language governing permissions and | |
14 * limitations under the License. | |
15 */ | |
0 | 16 package jetbrains.buildServer.buildTriggers.vcs.mercurial; |
17 | |
48 | 18 import jetbrains.buildServer.AgentSideCheckoutAbility; |
0 | 19 import jetbrains.buildServer.CollectChangesByIncludeRule; |
20 import jetbrains.buildServer.Used; | |
21 import jetbrains.buildServer.buildTriggers.vcs.AbstractVcsPropertiesProcessor; | |
22 import jetbrains.buildServer.buildTriggers.vcs.mercurial.command.*; | |
23 import jetbrains.buildServer.log.Loggers; | |
24 import jetbrains.buildServer.serverSide.InvalidProperty; | |
25 import jetbrains.buildServer.serverSide.PropertiesProcessor; | |
21 | 26 import jetbrains.buildServer.serverSide.SBuildServer; |
0 | 27 import jetbrains.buildServer.serverSide.ServerPaths; |
28 import jetbrains.buildServer.util.FileUtil; | |
29 import jetbrains.buildServer.vcs.*; | |
30 import jetbrains.buildServer.vcs.patches.PatchBuilder; | |
31 import org.jetbrains.annotations.NotNull; | |
32 import org.jetbrains.annotations.Nullable; | |
33 | |
1 | 34 import java.io.File; |
35 import java.io.FileFilter; | |
36 import java.io.FileInputStream; | |
37 import java.io.IOException; | |
38 import java.util.*; | |
21 | 39 import java.util.concurrent.ConcurrentHashMap; |
40 import java.util.concurrent.ConcurrentMap; | |
41 import java.util.concurrent.TimeUnit; | |
42 import java.util.concurrent.locks.Lock; | |
43 import java.util.concurrent.locks.ReentrantLock; | |
1 | 44 |
19 | 45 /** |
46 * Mercurial VCS plugin for TeamCity works as follows: | |
47 * <ul> | |
48 * <li>clones repository to internal storage | |
49 * <li>before any operation with working copy of repository pulls changes from the original repository | |
50 * <li>executes corresponding hg command | |
51 * </ul> | |
52 * | |
53 * <p>Working copy of repository is created in the $TEAMCITY_DATA_PATH/system/caches/mercurial folder. | |
54 * <p>Personal builds (remote runs) are not yet supported, they require corresponding functionality from the IDE. | |
55 * <p>Checkout on agent mode is not yet supported too. | |
56 */ | |
48 | 57 public class MercurialVcsSupport extends VcsSupport implements CollectChangesByIncludeRule, LabelingSupport, AgentSideCheckoutAbility { |
21 | 58 private ConcurrentMap<String, Lock> myWorkDirLocks= new ConcurrentHashMap<String, Lock>(); |
59 private static final int OLD_WORK_DIRS_CLEANUP_PERIOD = 600; | |
60 private VcsManager myVcsManager; | |
27
7944e8985ebd
prepare modules structure for agent side checkout
Pavel.Sher
parents:
25
diff
changeset
|
61 private File myDefaultWorkFolderParent; |
0 | 62 |
21 | 63 public MercurialVcsSupport(@NotNull final VcsManager vcsManager, |
64 @NotNull ServerPaths paths, | |
65 @NotNull SBuildServer server) { | |
0 | 66 vcsManager.registerVcsSupport(this); |
21 | 67 myVcsManager = vcsManager; |
68 server.getExecutor().scheduleAtFixedRate(new Runnable() { | |
69 public void run() { | |
70 removeOldWorkFolders(); | |
71 } | |
72 }, 0, OLD_WORK_DIRS_CLEANUP_PERIOD, TimeUnit.SECONDS); | |
27
7944e8985ebd
prepare modules structure for agent side checkout
Pavel.Sher
parents:
25
diff
changeset
|
73 myDefaultWorkFolderParent = new File(paths.getCachesDir()); |
0 | 74 } |
75 | |
76 public List<ModificationData> collectBuildChanges(final VcsRoot root, | |
77 @NotNull final String fromVersion, | |
78 @NotNull final String currentVersion, | |
79 final CheckoutRules checkoutRules) throws VcsException { | |
44 | 80 syncClonedRepository(root); |
0 | 81 return VcsSupportUtil.collectBuildChanges(root, fromVersion, currentVersion, checkoutRules, this); |
82 } | |
83 | |
84 public List<ModificationData> collectBuildChanges(final VcsRoot root, | |
85 final String fromVersion, | |
86 final String currentVersion, | |
87 final IncludeRule includeRule) throws VcsException { | |
19 | 88 // first obtain changes between specified versions |
0 | 89 List<ModificationData> result = new ArrayList<ModificationData>(); |
44 | 90 Settings settings = createSettings(root); |
0 | 91 LogCommand lc = new LogCommand(settings); |
92 lc.setFromRevId(new ChangeSet(fromVersion).getId()); | |
93 lc.setToRevId(new ChangeSet(currentVersion).getId()); | |
94 List<ChangeSet> changeSets = lc.execute(); | |
95 if (changeSets.isEmpty()) { | |
96 return result; | |
97 } | |
98 | |
19 | 99 // invoke status command for each changeset and determine what files were modified in these changesets |
0 | 100 Iterator<ChangeSet> it = changeSets.iterator(); |
101 ChangeSet prev = it.next(); // skip first changeset (cause it was already reported) | |
102 StatusCommand st = new StatusCommand(settings); | |
103 while (it.hasNext()) { | |
104 ChangeSet cur = it.next(); | |
105 st.setFromRevId(prev.getId()); | |
106 st.setToRevId(cur.getId()); | |
107 List<ModifiedFile> modifiedFiles = st.execute(); | |
19 | 108 // changeset full version will be set into VcsChange structure and |
20 | 109 // stored in database (note that getContent method will be invoked with this version) |
0 | 110 List<VcsChange> files = toVcsChanges(modifiedFiles, prev.getFullVersion(), cur.getFullVersion(), includeRule); |
111 if (files.isEmpty()) continue; | |
112 ModificationData md = new ModificationData(cur.getTimestamp(), files, cur.getSummary(), cur.getUser(), root, cur.getFullVersion(), cur.getFullVersion()); | |
113 result.add(md); | |
114 prev = cur; | |
115 } | |
116 | |
117 return result; | |
118 } | |
119 | |
120 private List<VcsChange> toVcsChanges(final List<ModifiedFile> modifiedFiles, String prevVer, String curVer, final IncludeRule includeRule) { | |
121 List<VcsChange> files = new ArrayList<VcsChange>(); | |
122 for (ModifiedFile mf: modifiedFiles) { | |
21 | 123 String normalizedPath = PathUtil.normalizeSeparator(mf.getPath()); |
12 | 124 if (!normalizedPath.startsWith(includeRule.getFrom())) continue; // skip files which do not match include rule |
0 | 125 |
126 VcsChangeInfo.Type changeType = getChangeType(mf.getStatus()); | |
127 if (changeType == null) { | |
128 Loggers.VCS.warn("Unable to convert status: " + mf.getStatus() + " to VCS change type"); | |
129 changeType = VcsChangeInfo.Type.NOT_CHANGED; | |
130 } | |
12 | 131 files.add(new VcsChange(changeType, mf.getStatus().getName(), normalizedPath, normalizedPath, prevVer, curVer)); |
0 | 132 } |
133 return files; | |
134 } | |
135 | |
136 private VcsChangeInfo.Type getChangeType(final ModifiedFile.Status status) { | |
137 switch (status) { | |
138 case ADDED:return VcsChangeInfo.Type.ADDED; | |
139 case MODIFIED:return VcsChangeInfo.Type.CHANGED; | |
140 case REMOVED:return VcsChangeInfo.Type.REMOVED; | |
141 } | |
142 return null; | |
143 } | |
144 | |
145 @NotNull | |
146 public byte[] getContent(final VcsModification vcsModification, | |
147 final VcsChangeInfo change, | |
148 final VcsChangeInfo.ContentType contentType, | |
149 final VcsRoot vcsRoot) throws VcsException { | |
44 | 150 syncClonedRepository(vcsRoot); |
12 | 151 String version = contentType == VcsChangeInfo.ContentType.AFTER_CHANGE ? change.getAfterChangeRevisionNumber() : change.getBeforeChangeRevisionNumber(); |
152 return getContent(change.getRelativeFileName(), vcsRoot, version); | |
0 | 153 } |
154 | |
155 @NotNull | |
12 | 156 public byte[] getContent(final String filePath, final VcsRoot vcsRoot, final String version) throws VcsException { |
44 | 157 syncClonedRepository(vcsRoot); |
158 Settings settings = createSettings(vcsRoot); | |
12 | 159 CatCommand cc = new CatCommand(settings); |
160 ChangeSet cs = new ChangeSet(version); | |
161 cc.setRevId(cs.getId()); | |
162 File parentDir = cc.execute(Collections.singletonList(filePath)); | |
30 | 163 try { |
164 File file = new File(parentDir, filePath); | |
165 if (file.isFile()) { | |
166 try { | |
167 return FileUtil.loadFileBytes(file); | |
168 } catch (IOException e) { | |
169 throw new VcsException("Failed to load content of file: " + file.getAbsolutePath(), e); | |
170 } | |
171 } else { | |
172 Loggers.VCS.warn("Unable to obtain content of the file: " + filePath); | |
12 | 173 } |
30 | 174 } finally { |
175 FileUtil.delete(parentDir); | |
12 | 176 } |
0 | 177 return new byte[0]; |
178 } | |
179 | |
180 public String getName() { | |
28
a7cab5083ada
libraries moved on top level, dummy implementation of agent side checkout interface
Pavel.Sher
parents:
27
diff
changeset
|
181 return Constants.VCS_NAME; |
0 | 182 } |
183 | |
184 @Used("jsp") | |
185 public String getDisplayName() { | |
186 return "Mercurial"; | |
187 } | |
188 | |
189 @Nullable | |
190 public PropertiesProcessor getVcsPropertiesProcessor() { | |
191 return new AbstractVcsPropertiesProcessor() { | |
192 public Collection<InvalidProperty> process(final Map<String, String> properties) { | |
193 List<InvalidProperty> result = new ArrayList<InvalidProperty>(); | |
194 if (isEmpty(properties.get(Constants.HG_COMMAND_PATH_PROP))) { | |
195 result.add(new InvalidProperty(Constants.HG_COMMAND_PATH_PROP, "Path to 'hg' command must be specified")); | |
196 } | |
197 if (isEmpty(properties.get(Constants.REPOSITORY_PROP))) { | |
198 result.add(new InvalidProperty(Constants.REPOSITORY_PROP, "Repository must be specified")); | |
199 } | |
200 return result; | |
201 } | |
202 }; | |
203 } | |
204 | |
205 public String getVcsSettingsJspFilePath() { | |
206 return "mercurialSettings.jsp"; | |
207 } | |
208 | |
209 @NotNull | |
210 public String getCurrentVersion(final VcsRoot root) throws VcsException { | |
19 | 211 // we will return full version of the most recent change as current version |
44 | 212 syncClonedRepository(root); |
213 Settings settings = createSettings(root); | |
9
7dadebd03515
use tip command instead of log in getCurrentVersion method
Pavel.Sher
parents:
8
diff
changeset
|
214 TipCommand lc = new TipCommand(settings); |
7dadebd03515
use tip command instead of log in getCurrentVersion method
Pavel.Sher
parents:
8
diff
changeset
|
215 ChangeSet changeSet = lc.execute(); |
0 | 216 return changeSet.getFullVersion(); |
217 } | |
218 | |
219 public String describeVcsRoot(final VcsRoot vcsRoot) { | |
220 return "mercurial: " + vcsRoot.getProperty(Constants.REPOSITORY_PROP); | |
221 } | |
222 | |
223 public boolean isTestConnectionSupported() { | |
16
7aa397165fa0
identify command added, test connection now uses identify command
Pavel.Sher
parents:
13
diff
changeset
|
224 return true; |
0 | 225 } |
226 | |
227 @Nullable | |
228 public String testConnection(final VcsRoot vcsRoot) throws VcsException { | |
44 | 229 Settings settings = createSettings(vcsRoot); |
16
7aa397165fa0
identify command added, test connection now uses identify command
Pavel.Sher
parents:
13
diff
changeset
|
230 IdentifyCommand id = new IdentifyCommand(settings); |
7aa397165fa0
identify command added, test connection now uses identify command
Pavel.Sher
parents:
13
diff
changeset
|
231 StringBuilder res = new StringBuilder(); |
17 | 232 res.append(quoteIfNeeded(settings.getHgCommandPath())); |
233 res.append(" identify "); | |
234 res.append(quoteIfNeeded(settings.getRepository())); | |
16
7aa397165fa0
identify command added, test connection now uses identify command
Pavel.Sher
parents:
13
diff
changeset
|
235 res.append('\n').append(id.execute()); |
7aa397165fa0
identify command added, test connection now uses identify command
Pavel.Sher
parents:
13
diff
changeset
|
236 return res.toString(); |
0 | 237 } |
238 | |
17 | 239 private String quoteIfNeeded(@NotNull String str) { |
240 if (str.indexOf(' ') != -1) { | |
241 return "\"" + str + "\""; | |
242 } | |
243 | |
244 return str; | |
245 } | |
246 | |
0 | 247 @Nullable |
248 public Map<String, String> getDefaultVcsProperties() { | |
19 | 249 return Collections.singletonMap(Constants.HG_COMMAND_PATH_PROP, "hg"); |
0 | 250 } |
251 | |
252 public String getVersionDisplayName(final String version, final VcsRoot root) throws VcsException { | |
253 return version; | |
254 } | |
255 | |
256 @NotNull | |
257 public Comparator<String> getVersionComparator() { | |
19 | 258 // comparator is called when TeamCity needs to sort modifications in the order of their appearance, |
259 // currently we sort changes by revision number, not sure however that this is a good idea, | |
260 // probably it would be better to sort them by timestamp (and to add timestamp into the version). | |
0 | 261 return new Comparator<String>() { |
262 public int compare(final String o1, final String o2) { | |
263 try { | |
264 return new ChangeSet(o1).getRevNumber() - new ChangeSet(o2).getRevNumber(); | |
265 } catch (Exception e) { | |
266 return 1; | |
267 } | |
268 } | |
269 }; | |
270 } | |
271 | |
272 public void buildPatch(final VcsRoot root, | |
273 @Nullable final String fromVersion, | |
274 @NotNull final String toVersion, | |
275 final PatchBuilder builder, | |
276 final CheckoutRules checkoutRules) throws IOException, VcsException { | |
44 | 277 syncClonedRepository(root); |
278 Settings settings = createSettings(root); | |
0 | 279 if (fromVersion == null) { |
280 buildFullPatch(settings, new ChangeSet(toVersion), builder); | |
281 } else { | |
282 buildIncrementalPatch(settings, new ChangeSet(fromVersion), new ChangeSet(toVersion), builder); | |
283 } | |
284 } | |
285 | |
19 | 286 // builds patch from version to version |
0 | 287 private void buildIncrementalPatch(final Settings settings, @NotNull final ChangeSet fromVer, @NotNull final ChangeSet toVer, final PatchBuilder builder) |
288 throws VcsException, IOException { | |
289 StatusCommand st = new StatusCommand(settings); | |
290 st.setFromRevId(fromVer.getId()); | |
291 st.setToRevId(toVer.getId()); | |
292 List<ModifiedFile> modifiedFiles = st.execute(); | |
293 List<String> notDeletedFiles = new ArrayList<String>(); | |
294 for (ModifiedFile f: modifiedFiles) { | |
295 if (f.getStatus() != ModifiedFile.Status.REMOVED) { | |
296 notDeletedFiles.add(f.getPath()); | |
297 } | |
298 } | |
299 | |
47
c785bc4c5f39
minor fix: do not call cat command if there are no files to export
Pavel.Sher
parents:
46
diff
changeset
|
300 if (notDeletedFiles.isEmpty()) return; |
c785bc4c5f39
minor fix: do not call cat command if there are no files to export
Pavel.Sher
parents:
46
diff
changeset
|
301 |
0 | 302 CatCommand cc = new CatCommand(settings); |
303 cc.setRevId(toVer.getId()); | |
304 File parentDir = cc.execute(notDeletedFiles); | |
305 | |
306 try { | |
307 for (ModifiedFile f: modifiedFiles) { | |
308 final File virtualFile = new File(f.getPath()); | |
309 if (f.getStatus() == ModifiedFile.Status.REMOVED) { | |
310 builder.deleteFile(virtualFile, true); | |
311 } else { | |
312 File realFile = new File(parentDir, f.getPath()); | |
313 FileInputStream is = new FileInputStream(realFile); | |
314 try { | |
11 | 315 builder.changeOrCreateBinaryFile(virtualFile, null, is, realFile.length()); |
0 | 316 } finally { |
317 is.close(); | |
318 } | |
319 } | |
320 } | |
321 } finally { | |
322 FileUtil.delete(parentDir); | |
323 } | |
324 } | |
325 | |
19 | 326 // builds patch by exporting files using specified version |
0 | 327 private void buildFullPatch(final Settings settings, @NotNull final ChangeSet toVer, final PatchBuilder builder) |
328 throws IOException, VcsException { | |
329 CloneCommand cl = new CloneCommand(settings); | |
330 cl.setToId(toVer.getId()); | |
331 File tempDir = FileUtil.createTempDirectory("mercurial", toVer.getId()); | |
332 try { | |
333 final File repRoot = new File(tempDir, "rep"); | |
334 cl.setDestDir(repRoot.getAbsolutePath()); | |
335 cl.execute(); | |
336 buildPatchFromDirectory(builder, repRoot, new FileFilter() { | |
337 public boolean accept(final File file) { | |
338 return !(file.isDirectory() && ".hg".equals(file.getName())); | |
339 } | |
340 }); | |
341 } finally { | |
342 FileUtil.delete(tempDir); | |
343 } | |
344 } | |
345 | |
346 private void buildPatchFromDirectory(final PatchBuilder builder, final File repRoot, final FileFilter filter) throws IOException { | |
347 buildPatchFromDirectory(repRoot, builder, repRoot, filter); | |
348 } | |
349 | |
350 private void buildPatchFromDirectory(File curDir, final PatchBuilder builder, final File repRoot, final FileFilter filter) throws IOException { | |
351 File[] files = curDir.listFiles(filter); | |
352 if (files != null) { | |
353 for (File realFile: files) { | |
354 String relPath = realFile.getAbsolutePath().substring(repRoot.getAbsolutePath().length()); | |
355 final File virtualFile = new File(relPath); | |
356 if (realFile.isDirectory()) { | |
357 builder.createDirectory(virtualFile); | |
358 buildPatchFromDirectory(realFile, builder, repRoot, filter); | |
359 } else { | |
360 final FileInputStream is = new FileInputStream(realFile); | |
361 try { | |
362 builder.createBinaryFile(virtualFile, null, is, realFile.length()); | |
363 } finally { | |
364 is.close(); | |
365 } | |
366 } | |
367 } | |
368 } | |
369 } | |
370 | |
19 | 371 // updates current working copy of repository by pulling changes from the repository specified in VCS root |
44 | 372 private void syncClonedRepository(final VcsRoot root) throws VcsException { |
373 Settings settings = createSettings(root); | |
22 | 374 File workDir = settings.getWorkingDir(); |
21 | 375 lockWorkDir(workDir); |
376 try { | |
29 | 377 if (settings.hasCopyOfRepository()) { |
0 | 378 // update |
8 | 379 PullCommand pull = new PullCommand(settings); |
380 pull.execute(); | |
0 | 381 } else { |
382 // clone | |
383 CloneCommand cl = new CloneCommand(settings); | |
22 | 384 cl.setDestDir(workDir.getAbsolutePath()); |
18 | 385 cl.setUpdateWorkingDir(false); |
0 | 386 cl.execute(); |
387 } | |
21 | 388 } finally { |
389 unlockWorkDir(workDir); | |
0 | 390 } |
391 } | |
392 | |
44 | 393 @Override |
394 public LabelingSupport getLabelingSupport() { | |
395 return this; | |
396 } | |
397 | |
22 | 398 private void lockWorkDir(@NotNull File workDir) { |
21 | 399 getWorkDirLock(workDir).lock(); |
400 } | |
401 | |
22 | 402 private void unlockWorkDir(@NotNull File workDir) { |
21 | 403 getWorkDirLock(workDir).unlock(); |
404 } | |
405 | |
31 | 406 @Override |
407 public boolean ignoreServerCachesFor(final VcsRoot root) { | |
408 // since a copy of repository for each VCS root is already stored on disk | |
409 // we do not need separate cache for our patches | |
410 return true; | |
411 } | |
412 | |
22 | 413 private Lock getWorkDirLock(final File workDir) { |
414 String path = workDir.getAbsolutePath(); | |
415 Lock lock = myWorkDirLocks.get(path); | |
21 | 416 if (lock == null) { |
417 lock = new ReentrantLock(); | |
22 | 418 Lock curLock = myWorkDirLocks.putIfAbsent(path, lock); |
21 | 419 if (curLock != null) { |
420 lock = curLock; | |
421 } | |
422 } | |
423 return lock; | |
424 } | |
425 | |
23 | 426 private void removeOldWorkFolders() { |
29 | 427 File workFoldersParent = new File(myDefaultWorkFolderParent, "mercurial"); |
23 | 428 if (!workFoldersParent.isDirectory()) return; |
429 | |
430 Set<File> workDirs = new HashSet<File>(); | |
431 File[] files = workFoldersParent.listFiles(new FileFilter() { | |
432 public boolean accept(final File file) { | |
433 return file.isDirectory() && file.getName().startsWith(Settings.DEFAULT_WORK_DIR_PREFIX); | |
434 } | |
435 }); | |
436 if (files != null) { | |
437 for (File f: files) { | |
46 | 438 workDirs.add(PathUtil.getCanonicalFile(f)); |
23 | 439 } |
440 } | |
441 | |
442 for (VcsRoot vcsRoot: myVcsManager.getAllRegisteredVcsRoots()) { | |
443 if (getName().equals(vcsRoot.getVcsName())) { | |
44 | 444 Settings s = createSettings(vcsRoot); |
46 | 445 workDirs.remove(PathUtil.getCanonicalFile(s.getWorkingDir())); |
23 | 446 } |
447 } | |
448 | |
449 for (File f: workDirs) { | |
450 lockWorkDir(f); | |
451 try { | |
452 FileUtil.delete(f); | |
453 } finally { | |
454 unlockWorkDir(f); | |
455 } | |
456 } | |
457 } | |
44 | 458 |
459 public String label(@NotNull String label, @NotNull String version, @NotNull VcsRoot root, @NotNull CheckoutRules checkoutRules) throws VcsException { | |
460 syncClonedRepository(root); | |
461 | |
462 Settings settings = createSettings(root); | |
463 | |
464 // I do not know why but hg tag does not work correctly if | |
465 // update command was not invoked for the current repo | |
466 // in such case if there were no tags before Mercurial attempts to | |
467 // create new head when tag is pushed to the parent repository | |
468 UpdateCommand uc = new UpdateCommand(settings); | |
469 uc.execute(); | |
470 | |
471 String fixedTagname = fixTagName(label); | |
472 TagCommand tc = new TagCommand(settings); | |
473 tc.setRevId(new ChangeSet(version).getId()); | |
474 tc.setTag(fixedTagname); | |
475 tc.execute(); | |
476 | |
477 PushCommand pc = new PushCommand(settings); | |
478 pc.execute(); | |
479 return fixedTagname; | |
480 } | |
481 | |
482 private String fixTagName(final String label) { | |
483 // according to Mercurial documentation http://hgbook.red-bean.com/hgbookch8.html#x12-1570008 | |
484 // tag name must not contain: | |
485 // Colon (ASCII 58, “:”) | |
486 // Carriage return (ASCII 13, “\r”) | |
487 // Newline (ASCII 10, “\n”) | |
488 // all these characters will be replaced with _ (underscore) | |
489 return label.replace(':', '_').replace('\r', '_').replace('\n', '_'); | |
490 } | |
491 | |
492 private Settings createSettings(final VcsRoot root) { | |
493 return new Settings(myDefaultWorkFolderParent, root); | |
494 } | |
48 | 495 |
496 public boolean isAgentSideCheckoutAvailable() { | |
497 return true; | |
498 } | |
0 | 499 } |