diff options
author | Ketan Padegaonkar <KetanPadegaonkar@gmail.com> | 2011-05-19 14:02:02 +0530 |
---|---|---|
committer | Chris Aniszczyk <caniszczyk@gmail.com> | 2011-05-19 11:13:12 -0500 |
commit | d60001c83bfd2dd5170dc1a9377d6eec422b8619 (patch) | |
tree | 5c3e9a97364205aae817cdecab0f0b4311fd948b /org.eclipse.jgit.ant/src/org/eclipse | |
parent | 5ec4977bb514ec8eb01dd22c3e908fe3fe6da83f (diff) | |
download | jgit-d60001c83bfd2dd5170dc1a9377d6eec422b8619.tar.gz jgit-d60001c83bfd2dd5170dc1a9377d6eec422b8619.zip |
Add GitCloneTaskTest
Change-Id: Iec8cd032d8d659a896d909f9094f76b7d35147e6
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.ant/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java index 0794bf1d55..f40b7b1e23 100644 --- a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java +++ b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java @@ -45,10 +45,10 @@ package org.eclipse.jgit.ant.tasks; import java.io.File; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.eclipse.jgit.api.CloneCommand; import org.eclipse.jgit.api.Git; -import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.transport.URIish; @@ -107,10 +107,11 @@ public class GitCloneTask extends Task { log("Cloning repository " + uri); CloneCommand clone = Git.cloneRepository(); - clone.setURI(uri).setDirectory(destination).setBranch(branch).setBare(bare); try { + clone.setURI(uri).setDirectory(destination).setBranch(branch).setBare(bare); clone.call(); - } catch (JGitInternalException e) { + } catch (RuntimeException e) { + log("Could not clone repository: " + e, e, Project.MSG_ERR); throw new BuildException("Could not clone repository: " + e.getMessage(), e); } } |