package bluej.groupwork.svn;

import java.io.File;

import org.tigris.subversion.javahl.ClientException;
import org.tigris.subversion.javahl.Depth;
import org.tigris.subversion.javahl.Revision;
import org.tigris.subversion.javahl.SVNClientInterface;

import bluej.Config;
import bluej.groupwork.TeamworkCommandAborted;
import bluej.groupwork.TeamworkCommandError;
import bluej.groupwork.TeamworkCommandResult;


| Subversion command to share a project | | @author Davin McCall | public class SvnShareCommand extends SvnCommand{ public SvnShareCommand(SvnRepository repository) { super(repository); } protected TeamworkCommandResult doCommand() { SVNClientInterface client = getClient(); File projectPath = getRepository().getProjectPath(); String projUrl = getRepository().getReposUrl() + "/" + projectPath.getName(); try { System.setProperty("svnkit.wc.17", "false"); client.mkdir(new String[] {projUrl }, Config.getString("team.share.initialMessage")); client.checkout(projUrl, projectPath.getAbsolutePath(), Revision.HEAD, Revision.HEAD, Depth.empty, false, true); System.setProperty("svnkit.wc.17", "true"); if (! isCancelled()) { return new TeamworkCommandResult(); } } catch (ClientException ce) { if (! isCancelled()) { return new TeamworkCommandError(ce.getMessage(), ce.getLocalizedMessage()); } } return new TeamworkCommandAborted(); } }
top, use, map, class SvnShareCommand

.   SvnShareCommand
.   doCommand




64 neLoCode + 2 LoComm