Mercurial > hg > mercurial
changeset 120:ebca599e7e51 Darjeeling-5.1.x
Add loggin for deleting tmp directories.
author | nd@localhost.localdomain |
---|---|
date | Tue, 31 Aug 2010 20:46:18 +0400 |
parents | cab9916671ea |
children | b2d05e230e34 |
files | mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java mercurial.ipr |
diffstat | 2 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Fri Jul 30 20:36:04 2010 +0400 +++ b/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Tue Aug 31 20:46:18 2010 +0400 @@ -218,7 +218,7 @@ Loggers.VCS.warn("Unable to obtain content of the file: " + filePath); } } finally { - FileUtil.delete(parentDir); + deleteTmpDir(parentDir); } return new byte[0]; } @@ -382,7 +382,14 @@ } } } finally { - FileUtil.delete(parentDir); + deleteTmpDir(parentDir); + } + } + + private void deleteTmpDir(File parentDir) { + boolean dirDeleted = FileUtil.delete(parentDir); + if (!dirDeleted) { + Loggers.VCS.warn("Can not delete directory \"" + parentDir.getAbsolutePath() + "\""); } } @@ -581,9 +588,9 @@ private String fixTagName(final String label) { // according to Mercurial documentation http://hgbook.red-bean.com/hgbookch8.html#x12-1570008 // tag name must not contain: - // Colon (ASCII 58, “:”) - // Carriage return (ASCII 13, “\r”) - // Newline (ASCII 10, “\n”) + // Colon (ASCII 58, �:�) + // Carriage return (ASCII 13, �\r�) + // Newline (ASCII 10, �\n�) // all these characters will be replaced with _ (underscore) return label.replace(':', '_').replace('\r', '_').replace('\n', '_'); }
--- a/mercurial.ipr Fri Jul 30 20:36:04 2010 +0400 +++ b/mercurial.ipr Tue Aug 31 20:46:18 2010 +0400 @@ -352,7 +352,7 @@ <option name="SHOW_FILE_HISTORY_AS_TREE" value="true" /> </component> <component name="VcsDirectoryMappings"> - <mapping directory="" vcs="Mercurial" /> + <mapping directory="" vcs="hg4idea" /> </component> <component name="WebServicesPlugin" addRequiredLibraries="true" /> <component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">