01: /*
02: * ====================================================================
03: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
04: *
05: * This software is licensed as described in the file COPYING, which
06: * you should have received as part of this distribution. The terms
07: * are also available at http://svnkit.com/license.html.
08: * If newer versions of this license are posted there, you may use a
09: * newer version instead, at your option.
10: * ====================================================================
11: */
12: package org.tmatesoft.svn.cli.command;
13:
14: import java.io.File;
15: import java.io.InputStream;
16: import java.io.PrintStream;
17:
18: import org.tmatesoft.svn.cli.SVNCommand;
19: import org.tmatesoft.svn.core.SVNException;
20: import org.tmatesoft.svn.core.wc.admin.SVNLookClient;
21:
22: /**
23: * @version 1.1.1
24: * @author TMate Software Ltd.
25: * @since 1.1.1
26: */
27: public class SVNLookUUIDCommand extends SVNCommand {
28:
29: public void run(PrintStream out, PrintStream err)
30: throws SVNException {
31: if (!getCommandLine().hasPaths()) {
32: SVNCommand.println(err,
33: "jsvnlook: Repository argument required");
34: System.exit(1);
35: }
36: File reposRoot = new File(getCommandLine().getPathAt(0));
37: SVNLookClient lookClient = getClientManager().getLookClient();
38: SVNCommand.println(out, lookClient.doGetUUID(reposRoot));
39: }
40:
41: public void run(InputStream in, PrintStream out, PrintStream err)
42: throws SVNException {
43: run(out, err);
44: }
45:
46: }
|