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