comparison src/org/tmatesoft/hg/repo/HgLookup.java @ 186:44a34baabea0

Clone refactored into a command. HgBundle needs means to control its lifecycle, to be deleted when no longer needed
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 14 Apr 2011 00:47:04 +0200
parents cd3371670f0b
children 41a778e3fd31
comparison
equal deleted inserted replaced
185:c6fa4dbfc458 186:44a34baabea0
72 72
73 public HgBundle loadBundle(File location) throws HgException { 73 public HgBundle loadBundle(File location) throws HgException {
74 if (location == null || !location.canRead()) { 74 if (location == null || !location.canRead()) {
75 throw new IllegalArgumentException(); 75 throw new IllegalArgumentException();
76 } 76 }
77 return new HgBundle(new DataAccessProvider(), location); 77 return new HgBundle(new DataAccessProvider(), location).link();
78 } 78 }
79 79
80 /** 80 /**
81 * Try to instantiate remote server. 81 * Try to instantiate remote server.
82 * @param key either URL or a key from configuration file that points to remote server 82 * @param key either URL or a key from configuration file that points to remote server