comparison src/org/tmatesoft/hg/core/HgCloneCommand.java @ 622:4e6179bde4fc

Update to comply with Java 1.5 target
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 20 May 2013 16:56:40 +0200
parents 7c0d2ce340b8
children 6526d8adbc0f
comparison
equal deleted inserted replaced
621:99ad1e3a4e4d 622:4e6179bde4fc
176 cancelSupport = cancel; 176 cancelSupport = cancel;
177 revlogDataZip = new RevlogCompressor(sessionCtx); 177 revlogDataZip = new RevlogCompressor(sessionCtx);
178 pathFactory = ctx.getPathFactory(); 178 pathFactory = ctx.getPathFactory();
179 } 179 }
180 180
181 public void initEmptyRepository() throws IOException { 181 public void initEmptyRepository() throws HgIOException, HgRepositoryNotFoundException {
182 repoInit.initEmptyRepository(hgDir); 182 repoInit.initEmptyRepository(hgDir);
183 try { 183 assert (repoInit.getRequires() & FNCACHE) != 0;
184 assert (repoInit.getRequires() & FNCACHE) != 0; 184 // XXX perhaps, with WriteDownMate moving to a more appropriate location,
185 fncacheFile = new FNCacheFile(Internals.getInstance(new HgLookup(ctx).detect(hgDir))); 185 // we could instantiate HgRepository (or Internals) by other means, without exception?
186 } catch (HgRepositoryNotFoundException ex) { 186 fncacheFile = new FNCacheFile(Internals.getInstance(new HgLookup(ctx).detect(hgDir)));
187 // SHALL NOT HAPPEN provided we initialized empty repository successfully
188 // TODO perhaps, with WriteDownMate moving to a more appropriate location,
189 // we could instantiate HgRepository (or Internals) by other means, without exception?
190 throw new IOException("Can't access fncache for newly created repository", ex);
191 }
192 } 187 }
193 188
194 public void complete() throws IOException { 189 public void complete() throws IOException {
195 fncacheFile.write(); 190 fncacheFile.write();
196 } 191 }