This is an automated email from the git hooks/post-receive script. New commit to branch feature/GIT in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git commit faa724acc720c68a952317fde5e892cc0ee0a784 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Wed May 6 16:47:06 2015 +0200 Correction of some little bugs --- .../org/nuiton/scmwebeditor/GitConnection.java | 79 +++++++++++---------- .../java/org/nuiton/scmwebeditor/GitProvider.java | 23 +++++- .../org/nuiton/scmwebeditor/ScmConnection.java | 21 ++++++ .../java/org/nuiton/scmwebeditor/ScmProvider.java | 21 ++++++ .../nuiton/scmwebeditor/ScmWebEditorConfig.java | 12 ++-- .../scmwebeditor/ScmWebEditorConfigOption.java | 2 +- .../org/nuiton/scmwebeditor/SvnConnection.java | 62 +++++++++------- .../java/org/nuiton/scmwebeditor/SvnProvider.java | 22 ++++++ .../nuiton/scmwebeditor/actions/BrowseAction.java | 2 +- .../nuiton/scmwebeditor/actions/EditAction.java | 2 +- .../actions/ScmWebEditorCommitAction.java | 2 +- .../nuiton/scmwebeditor/actions/UploadAction.java | 3 +- src/main/resources/scmwebeditor.properties | 2 +- src/main/webapp/WEB-INF/content/browse.jsp | 2 +- src/main/webapp/img/icons/html.png | Bin 3298 -> 3235 bytes 15 files changed, 177 insertions(+), 78 deletions(-) diff --git a/src/main/java/org/nuiton/scmwebeditor/GitConnection.java b/src/main/java/org/nuiton/scmwebeditor/GitConnection.java index 5d88abc..c5ea428 100644 --- a/src/main/java/org/nuiton/scmwebeditor/GitConnection.java +++ b/src/main/java/org/nuiton/scmwebeditor/GitConnection.java @@ -2,7 +2,7 @@ * #%L * ScmWebEditor * %% - * Copyright (C) 2009 - 2014 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -27,7 +27,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.eclipse.jgit.api.*; import org.eclipse.jgit.api.errors.*; -import org.eclipse.jgit.diff.DiffEntry; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Repository; @@ -49,7 +48,6 @@ import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; -import java.util.List; public class GitConnection implements ScmConnection { @@ -763,71 +761,80 @@ public class GitConnection implements ScmConnection { localDirectory = new File(localReposPath + "/" + sessionId + "/" + hashedAddress); - // We don't need to clone the repository if we already have the last version - boolean cloneNeeded = false; + CredentialsProvider credentials = new UsernamePasswordCredentialsProvider(username, password); if (!localDirectory.exists()) { - cloneNeeded = true; - } else { - Git git = Git.open(localDirectory); - DiffCommand diff = git.diff(); - try { - List<DiffEntry> diffs = diff.call(); + CloneCommand clone = Git.cloneRepository(); + clone.setURI(addressGit); + clone.setDirectory(localDirectory); + clone.setCredentialsProvider(credentials); + try { + clone.call(); + } catch (InvalidRemoteException e) { + FileUtils.deleteDirectory(localDirectory); + if (log.isErrorEnabled()) { + log.error("Can't clone the remote repository", e); + } + } catch (TransportException e) { + FileUtils.deleteDirectory(localDirectory); + if (log.isErrorEnabled()) { + log.error("Can't clone the remote repository: " + addressGit, e); + } - // If there are differences, we delete the current version and clone the last one - if(diffs.size() > 0) { - FileUtils.deleteDirectory(localDirectory); - cloneNeeded = true; - if (log.isDebugEnabled()) { - log.debug("The current version is not the last one, cloning is required"); - } + if (e.getMessage().endsWith("500 Internal Server Error")) { + throw new AuthenticationException("Can not clone the Git repository: auth failed"); } else { - - if (log.isDebugEnabled()) { - log.debug("The current version is the last one, cloning is not required"); - } + throw new ScmNotFoundException("Can not find a Git repository at address " + addressGit); } } catch (GitAPIException e) { + FileUtils.deleteDirectory(localDirectory); if (log.isErrorEnabled()) { - log.error("The repository at address " + addressGit + " doesn't exist", e); + log.error("Can't clone the remote repository", e); } + throw new ScmNotFoundException("Can not find a Git repository at address " + addressGit); } - } - if (cloneNeeded) { + if (log.isDebugEnabled()) { + log.debug("Cloned repository " + addressGit); + } - CredentialsProvider credentials = new UsernamePasswordCredentialsProvider(username, password); + } else { + + Git git = Git.open(localDirectory); + + PullCommand pull = git.pull(); + pull.setCredentialsProvider(credentials); - CloneCommand clone = Git.cloneRepository(); - clone.setURI(addressGit); - clone.setDirectory(localDirectory); - clone.setCredentialsProvider(credentials); try { - clone.call(); + pull.call(); } catch (InvalidRemoteException e) { FileUtils.deleteDirectory(localDirectory); if (log.isErrorEnabled()) { - log.error("Can't clone the remote repository", e); + log.error("Can't pull the remote repository", e); } } catch (TransportException e) { FileUtils.deleteDirectory(localDirectory); if (log.isErrorEnabled()) { - log.error("Can't clone the remote repository: " + addressGit, e); + log.error("Can't pull the remote repository: " + addressGit, e); } if (e.getMessage().endsWith("500 Internal Server Error")) { - throw new AuthenticationException("Can not clone the Git repository: auth failed"); + throw new AuthenticationException("Can not pull the Git repository: auth failed"); } else { throw new ScmNotFoundException("Can not find a Git repository at address " + addressGit); } } catch (GitAPIException e) { FileUtils.deleteDirectory(localDirectory); if (log.isErrorEnabled()) { - log.error("Can't clone the remote repository", e); + log.error("Can't pull the remote repository", e); } throw new ScmNotFoundException("Can not find a Git repository at address " + addressGit); } + + if (log.isDebugEnabled()) { + log.debug("Pulled repository " + addressGit); + } } @@ -849,4 +856,4 @@ public class GitConnection implements ScmConnection { } } } -} +} \ No newline at end of file diff --git a/src/main/java/org/nuiton/scmwebeditor/GitProvider.java b/src/main/java/org/nuiton/scmwebeditor/GitProvider.java index 7dd9f1d..ddcc80a 100644 --- a/src/main/java/org/nuiton/scmwebeditor/GitProvider.java +++ b/src/main/java/org/nuiton/scmwebeditor/GitProvider.java @@ -1,3 +1,24 @@ +/* + * #%L + * ScmWebEditor + * %% + * Copyright (C) 2009 - 2015 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ package org.nuiton.scmwebeditor; import org.apache.commons.logging.Log; @@ -84,4 +105,4 @@ public class GitProvider implements ScmProvider { return false; } } -} +} \ No newline at end of file diff --git a/src/main/java/org/nuiton/scmwebeditor/ScmConnection.java b/src/main/java/org/nuiton/scmwebeditor/ScmConnection.java index a95025a..3c4fd3f 100644 --- a/src/main/java/org/nuiton/scmwebeditor/ScmConnection.java +++ b/src/main/java/org/nuiton/scmwebeditor/ScmConnection.java @@ -1,3 +1,24 @@ +/* + * #%L + * ScmWebEditor + * %% + * Copyright (C) 2009 - 2015 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ package org.nuiton.scmwebeditor; import org.nuiton.scmwebeditor.dto.*; diff --git a/src/main/java/org/nuiton/scmwebeditor/ScmProvider.java b/src/main/java/org/nuiton/scmwebeditor/ScmProvider.java index ed43021..13a83c7 100644 --- a/src/main/java/org/nuiton/scmwebeditor/ScmProvider.java +++ b/src/main/java/org/nuiton/scmwebeditor/ScmProvider.java @@ -1,3 +1,24 @@ +/* + * #%L + * ScmWebEditor + * %% + * Copyright (C) 2009 - 2015 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ package org.nuiton.scmwebeditor; import java.util.List; diff --git a/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorConfig.java b/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorConfig.java index c9a3b3d..db1085c 100644 --- a/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorConfig.java +++ b/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorConfig.java @@ -69,15 +69,13 @@ public class ScmWebEditorConfig { public static Map<String, String> getProviders() { - String key = ScmWebEditorConfigOption.PROVIDERS.getKey(); Map<String, String> providers = new HashMap<String, String>(); - Properties properties = getConfig().getOptions(); - - for (String propertyName : properties.stringPropertyNames()) { + String key = ScmWebEditorConfigOption.PROVIDERS.getKey(); + Properties options = getConfig().getOptionStartsWith(key); - // getting the properties about the providers only - if (propertyName.startsWith(key)) { + if (log.isDebugEnabled()) { + for (String propertyName : options.stringPropertyNames()) { String providerKey = propertyName.substring(propertyName.lastIndexOf('.') + 1); String providerClass = getConfig().getOption(propertyName); @@ -85,7 +83,7 @@ public class ScmWebEditorConfig { providers.put(providerKey, providerClass); } } - + return providers; } diff --git a/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorConfigOption.java b/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorConfigOption.java index e80b92b..3deabf2 100644 --- a/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorConfigOption.java +++ b/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorConfigOption.java @@ -30,7 +30,7 @@ public enum ScmWebEditorConfigOption implements ConfigOptionDef { EDITABLE_FILES("swe.editableFiles", "description", "Files types that are editable", String.class, true, true), COOKIES_PRIVATE_KEY("swe.cookiePrivateKey", "Private key for cookies", null, String.class, true, true), LOCAL_REPOSITORIES_PATH("swe.localRepositoriesPath", "The path where the local repositories will be stored", "/var/local/swe", String.class, false, true), - PROVIDERS("swe.provider", "The SCMs that can be used", null, String.class, false, true); + PROVIDERS("swe.provider.", "The SCMs that can be used", null, String.class, false, true); private final String key; diff --git a/src/main/java/org/nuiton/scmwebeditor/SvnConnection.java b/src/main/java/org/nuiton/scmwebeditor/SvnConnection.java index 6efc624..5a3faaa 100644 --- a/src/main/java/org/nuiton/scmwebeditor/SvnConnection.java +++ b/src/main/java/org/nuiton/scmwebeditor/SvnConnection.java @@ -2,7 +2,7 @@ * #%L * ScmWebEditor * %% - * Copyright (C) 2009 - 2014 CodeLutin + * Copyright (C) 2009 - 2015 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -25,14 +25,12 @@ import com.jgeppert.struts2.jquery.tree.result.TreeNode; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.scmwebeditor.actions.BrowseAction; -import org.nuiton.scmwebeditor.actions.ScmWebEditorCommitAction; -import org.nuiton.scmwebeditor.actions.UploadAction; import org.nuiton.scmwebeditor.dto.*; import org.nuiton.util.FileUtil; import org.tmatesoft.svn.core.*; import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager; import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; +import org.tmatesoft.svn.core.internal.util.SVNEncodingUtil; import org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions; import org.tmatesoft.svn.core.io.SVNRepository; import org.tmatesoft.svn.core.io.SVNRepositoryFactory; @@ -43,7 +41,7 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import java.util.*; +import java.util.Collection; public class SvnConnection implements ScmConnection { @@ -115,7 +113,6 @@ public class SvnConnection implements ScmConnection { String name = dto.getUsername(); String password = dto.getPassword(); - if (dto.getId().equals("")) { try { @@ -123,7 +120,8 @@ public class SvnConnection implements ScmConnection { log.debug("Address svn : " + dto.getAddress()); } - repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(dto.getAddress())); + String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); + repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(encodedUrl)); authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password); repository.setAuthenticationManager(authManager); @@ -139,7 +137,8 @@ public class SvnConnection implements ScmConnection { if (log.isErrorEnabled()) { log.error("Can't access to the repository", e); } - resultDto.setError(BrowseResultDto.ROOT); + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } resultDto.setError(BrowseResultDto.ROOT); @@ -154,7 +153,8 @@ public class SvnConnection implements ScmConnection { try { - repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url)); + String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); + repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(encodedUrl)); authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password); repository.setAuthenticationManager(authManager); @@ -332,7 +332,7 @@ public class SvnConnection implements ScmConnection { try { - FileUtil.writeString(pathToFile, dto.getNewText(), "UTF-8"); + FileUtil.getWriter(pathToFile, "UTF-8").write(dto.getNewText()); } catch (IOException e1) { delTempDirectory(checkoutdir); @@ -686,7 +686,11 @@ public class SvnConnection implements ScmConnection { } } - String headRevision = info.getRevision().toString(); + String headRevision = ""; + + if (info != null) { + headRevision = info.getRevision().toString(); + } return headRevision; } @@ -696,7 +700,8 @@ public class SvnConnection implements ScmConnection { public String getRepositoryId() { String repositoryUUID; try { - SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(addressSvn)); + String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); + SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(encodedUrl)); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(); repository.setAuthenticationManager(authManager); @@ -721,7 +726,8 @@ public class SvnConnection implements ScmConnection { public String getSvnRoot(String username, String password) { String repositoryRoot; try { - SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(addressSvn)); + String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); + SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(encodedUrl)); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(username, password); repository.setAuthenticationManager(authManager); @@ -744,7 +750,8 @@ public class SvnConnection implements ScmConnection { public void testConnection() throws SVNException { - SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(addressSvn)); + String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); + SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(encodedUrl)); repository.setAuthenticationManager(authManager); repository.testConnection(); @@ -885,7 +892,7 @@ public class SvnConnection implements ScmConnection { public void listEntries(SVNRepository repository, String path, String address, BrowseResultDto resultDto) { - Collection<SVNDirEntry> entries = null; + Collection entries = null; try { entries = repository.getDir(path, -1, null, (Collection<SVNDirEntry>) null); } catch (SVNException e) { @@ -895,18 +902,21 @@ public class SvnConnection implements ScmConnection { } - for (SVNDirEntry entry : entries) { - if (log.isDebugEnabled()) { - log.debug("/" + (path.equals("") ? "" : path + "/") + entry.getName() + "\n"); - } - String fichier = address + "/" + (path.equals("") ? "" : path + "/") + entry.getName(); + if (entries != null) { + for (Object entry : entries) { + if (log.isDebugEnabled()) { + log.debug("/" + (path.equals("") ? "" : path + "/") + ((SVNDirEntry) entry).getName() + "\n"); + } + String fichier = address + "/" + (path.equals("") ? "" : path + "/") + ((SVNDirEntry) entry).getName(); - if (entry.getKind() == SVNNodeKind.DIR) { - resultDto.getDirectories().put(getAddressUnique(fichier), fichier); - } else { - // only adding the files to the files list and not the directories - resultDto.getFiles().add(fichier); + + if (((SVNDirEntry) entry).getKind() == SVNNodeKind.DIR) { + resultDto.getDirectories().put(getAddressUnique(fichier), fichier); + } else { + // only adding the files to the files list and not the directories + resultDto.getFiles().add(fichier); + } } } @@ -922,4 +932,4 @@ public class SvnConnection implements ScmConnection { } -} +} \ No newline at end of file diff --git a/src/main/java/org/nuiton/scmwebeditor/SvnProvider.java b/src/main/java/org/nuiton/scmwebeditor/SvnProvider.java index a16220d..1fcd2ca 100644 --- a/src/main/java/org/nuiton/scmwebeditor/SvnProvider.java +++ b/src/main/java/org/nuiton/scmwebeditor/SvnProvider.java @@ -1,3 +1,25 @@ +/* + * #%L + * ScmWebEditor + * %% + * Copyright (C) 2009 - 2015 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + package org.nuiton.scmwebeditor; import org.apache.commons.logging.Log; diff --git a/src/main/java/org/nuiton/scmwebeditor/actions/BrowseAction.java b/src/main/java/org/nuiton/scmwebeditor/actions/BrowseAction.java index fe377c8..f047b5e 100644 --- a/src/main/java/org/nuiton/scmwebeditor/actions/BrowseAction.java +++ b/src/main/java/org/nuiton/scmwebeditor/actions/BrowseAction.java @@ -260,7 +260,7 @@ public class BrowseAction extends AbstractScmWebEditorAction implements ServletR // if the repository is not protected for writing, we get its UUID String repositoryUUID = scmConn.getRepositoryId(); if (repositoryUUID == null) { - repositoryUUID = address; + repositoryUUID = address.replace(' ', '_'); } if (username != null && pw != null) { diff --git a/src/main/java/org/nuiton/scmwebeditor/actions/EditAction.java b/src/main/java/org/nuiton/scmwebeditor/actions/EditAction.java index 2685cad..10c2c08 100644 --- a/src/main/java/org/nuiton/scmwebeditor/actions/EditAction.java +++ b/src/main/java/org/nuiton/scmwebeditor/actions/EditAction.java @@ -56,7 +56,7 @@ public class EditAction extends ScmWebEditorMainAction { // if the repository is not protected, we get its UUID String repositoryUUID = scmConn.getRepositoryId(); if (repositoryUUID == null) { - repositoryUUID = address; + repositoryUUID = address.replace(' ', '_'); } if (log.isDebugEnabled()) { diff --git a/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorCommitAction.java b/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorCommitAction.java index d3d82c7..1712b0c 100644 --- a/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorCommitAction.java +++ b/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorCommitAction.java @@ -259,7 +259,7 @@ public class ScmWebEditorCommitAction extends AbstractScmWebEditorAction impleme // if the repository is not protected for writing, we get its UUID String repositoryUUID = scmConn.getRepositoryId(); if (repositoryUUID == null) { - repositoryUUID = address; + repositoryUUID = address.replace(' ', '_'); } diff --git a/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java b/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java index cd2ca54..84a7f35 100644 --- a/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java +++ b/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java @@ -25,7 +25,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts2.interceptor.ServletRequestAware; import org.nuiton.scmwebeditor.ScmConnection; -import org.nuiton.scmwebeditor.ScmNotFoundException; import org.nuiton.scmwebeditor.ScmProvider; import org.nuiton.scmwebeditor.dto.UploadDto; import org.nuiton.scmwebeditor.dto.UploadResultDto; @@ -161,7 +160,7 @@ public class UploadAction extends AbstractScmWebEditorAction implements ServletR // if the repository is not protected for writing, we get its UUID String repositoryUUID = scmConn.getRepositoryId(); if (repositoryUUID == null) { - repositoryUUID = address; + repositoryUUID = address.replace(' ', '_'); } diff --git a/src/main/resources/scmwebeditor.properties b/src/main/resources/scmwebeditor.properties index a6b78a7..9035e4c 100644 --- a/src/main/resources/scmwebeditor.properties +++ b/src/main/resources/scmwebeditor.properties @@ -23,4 +23,4 @@ swe.editableFiles=text,xml,javascript,sh,x-tex,x-java swe.cookiePrivateKey=ZvcCyhfRTVZoQz3B/IpYdw== swe.localRepositoriesPath=/var/local/swe swe.provider.SVN=org.nuiton.scmwebeditor.SvnProvider -swe.provider.Git=org.nuiton.scmwebeditor.GitProvider +swe.provider.Git=org.nuiton.scmwebeditor.GitProvider \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/content/browse.jsp b/src/main/webapp/WEB-INF/content/browse.jsp index 7449f2d..b3bd937 100644 --- a/src/main/webapp/WEB-INF/content/browse.jsp +++ b/src/main/webapp/WEB-INF/content/browse.jsp @@ -36,7 +36,7 @@ if (item.length == 1) { var classAttr = item[0].getAttribute("class"); - if (classAttr == "jstree-leaf") { + if (classAttr.contains("jstree-leaf")) { var scmType = $("#scmType").val(); var selectedBranch = $("#selectedBranchDisplay").text().trim(); diff --git a/src/main/webapp/img/icons/html.png b/src/main/webapp/img/icons/html.png index caba574..f8850c8 100644 Binary files a/src/main/webapp/img/icons/html.png and b/src/main/webapp/img/icons/html.png differ -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.