Mercurial > hg4j
diff src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java @ 490:b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 16 Aug 2012 17:08:34 +0200 |
parents | 5c09a9f2e073 |
children | ba36f66c32b4 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java Mon Aug 13 19:24:29 2012 +0200 +++ b/src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java Thu Aug 16 17:08:34 2012 +0200 @@ -365,7 +365,7 @@ } } } catch (HgRuntimeException ex) { - repo.getContext().getLog().dump(getClass(), Warn, ex, null); + repo.getSessionContext().getLog().dump(getClass(), Warn, ex, null); inspector.invalid(fname, ex); } } @@ -457,7 +457,7 @@ inspector.modified(fname); } } catch (HgRuntimeException ex) { - repo.getContext().getLog().dump(getClass(), Warn, ex, null); + repo.getSessionContext().getLog().dump(getClass(), Warn, ex, null); inspector.invalid(fname, ex); } baseRevNames.remove(fname); // consumed, processed, handled. @@ -494,7 +494,7 @@ private boolean areTheSame(FileInfo f, final byte[] data, Path p) throws HgInvalidFileException { ReadableByteChannel is = null; class Check implements ByteChannel { - final boolean debug = repo.getContext().getLog().isDebug(); + final boolean debug = repo.getSessionContext().getLog().isDebug(); boolean sameSoFar = true; int x = 0; @@ -514,7 +514,7 @@ int offset = max(0, x - 4); exp = new String(data, offset, min(data.length - offset, 20)); } - repo.getContext().getLog().dump(getClass(), Debug, "expected >>%s<< but got >>%s<<", exp, new String(xx)); + repo.getSessionContext().getLog().dump(getClass(), Debug, "expected >>%s<< but got >>%s<<", exp, new String(xx)); } sameSoFar = false; break; @@ -547,7 +547,7 @@ try { is.close(); } catch (IOException ex) { - repo.getContext().getLog().dump(getClass(), Info, ex, null); + repo.getSessionContext().getLog().dump(getClass(), Info, ex, null); } is = f.newInputChannel(); fb.clear(); @@ -559,7 +559,7 @@ } return check.ultimatelyTheSame(); } catch (CancelledException ex) { - repo.getContext().getLog().dump(getClass(), Warn, ex, "Unexpected cancellation"); + repo.getSessionContext().getLog().dump(getClass(), Warn, ex, "Unexpected cancellation"); return check.ultimatelyTheSame(); } catch (IOException ex) { throw new HgInvalidFileException("File comparison failed", ex).setFileName(p); @@ -568,7 +568,7 @@ try { is.close(); } catch (IOException ex) { - repo.getContext().getLog().dump(getClass(), Info, ex, null); + repo.getSessionContext().getLog().dump(getClass(), Info, ex, null); } } } @@ -631,7 +631,7 @@ // final Path[] dirs = f.toArray(new Path[d.size()]); if (d.isEmpty()) { final Path[] files = f.toArray(new Path[f.size()]); - FileIterator fi = new FileListIterator(hgRepo.getContext(), hgRepo.getWorkingDir(), files); + FileIterator fi = new FileListIterator(hgRepo.getSessionContext(), hgRepo.getWorkingDir(), files); return new HgWorkingCopyStatusCollector(hgRepo, fi); } //