diff src/org/tmatesoft/hg/repo/HgDataFile.java @ 355:f2c11fe7f3e9

Newline filter shall respect whole stream when deciding whether to process line terminators, hence added stream preview functionality
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 06 Dec 2011 12:57:21 +0100
parents 5f9073eabf06
children 189dc6dc1c3e
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgDataFile.java	Thu Dec 01 05:21:40 2011 +0100
+++ b/src/org/tmatesoft/hg/repo/HgDataFile.java	Tue Dec 06 12:57:21 2011 +0100
@@ -159,6 +159,8 @@
 				}
 			}
 		} else {
+			// FIXME not TIP, but revision according to dirstate!!!
+			// add tests for this case
 			contentWithFilters(TIP, sink);
 		}
 	}
@@ -219,12 +221,12 @@
 		}
 		ErrorHandlingInspector insp;
 		if (metadata.none(revision)) {
-			insp = new ContentPipe(sink, 0);
+			insp = new ContentPipe(sink, 0, getRepo().getContext().getLog());
 		} else if (metadata.known(revision)) {
-			insp = new ContentPipe(sink, metadata.dataOffset(revision));
+			insp = new ContentPipe(sink, metadata.dataOffset(revision), getRepo().getContext().getLog());
 		} else {
 			// do not know if there's metadata
-			insp = new MetadataInspector(metadata, getPath(), new ContentPipe(sink, 0));
+			insp = new MetadataInspector(metadata, getPath(), new ContentPipe(sink, 0, getRepo().getContext().getLog()));
 		}
 		insp.checkCancelled();
 		super.content.iterate(revision, revision, true, insp);