comparison cmdline/org/tmatesoft/hg/console/Cat.java @ 74:6f1b88693d48

Complete refactoring to org.tmatesoft
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 24 Jan 2011 03:14:45 +0100
parents 9a03a80a0f2f
children ace7042a5ce6
comparison
equal deleted inserted replaced
73:0d279bcc4442 74:6f1b88693d48
14 * the terms of a license other than GNU General Public License 14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@svnkit.com 15 * contact TMate Software at support@svnkit.com
16 */ 16 */
17 package org.tmatesoft.hg.console; 17 package org.tmatesoft.hg.console;
18 18
19 import com.tmate.hgkit.fs.RepositoryLookup; 19 import org.tmatesoft.hg.internal.DigestHelper;
20 import com.tmate.hgkit.ll.DigestHelper; 20 import org.tmatesoft.hg.repo.HgDataFile;
21 import com.tmate.hgkit.ll.HgDataFile; 21 import org.tmatesoft.hg.repo.HgRepository;
22 import com.tmate.hgkit.ll.HgRepository; 22 import org.tmatesoft.hg.repo.Internals;
23 import com.tmate.hgkit.ll.Internals; 23
24 24
25 /** 25 /**
26 * @author Artem Tikhomirov 26 * @author Artem Tikhomirov
27 * @author TMate Software Ltd. 27 * @author TMate Software Ltd.
28 */ 28 */
29 public class Cat { 29 public class Cat {
30 30
31 public static void main(String[] args) throws Exception { 31 public static void main(String[] args) throws Exception {
32 RepositoryLookup repoLookup = new RepositoryLookup(); 32 Options cmdLineOpts = Options.parse(args);
33 RepositoryLookup.Options cmdLineOpts = RepositoryLookup.Options.parse(args); 33 HgRepository hgRepo = cmdLineOpts.findRepository();
34 HgRepository hgRepo = repoLookup.detect(cmdLineOpts);
35 if (hgRepo.isInvalid()) { 34 if (hgRepo.isInvalid()) {
36 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); 35 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation());
37 return; 36 return;
38 } 37 }
39 Internals debug = new Internals(hgRepo); 38 Internals debug = new Internals(hgRepo);