Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java @ 710:cf200271439a
KeywordFilter: 'IllegalStateException: need buffer of at least...' during status op for a small file
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 07 Oct 2013 01:56:05 +0200 |
parents | 7efabe0cddcf |
children |
comparison
equal
deleted
inserted
replaced
709:497e697636fc | 710:cf200271439a |
---|---|
562 } | 562 } |
563 }; | 563 }; |
564 Check check = new Check(); | 564 Check check = new Check(); |
565 try { | 565 try { |
566 is = f.newInputChannel(); | 566 is = f.newInputChannel(); |
567 ByteBuffer fb = ByteBuffer.allocate(min(1 + data.length * 2 /*to fit couple of lines appended; never zero*/, 8192)); | 567 // ByteBuffer fb = ByteBuffer.allocate(min(1 + data.length * 2 /*to fit couple of lines appended; never zero*/, 8192)); |
568 ByteBuffer fb = ByteBuffer.allocate(8192); // FIXME temp fix to ensure big enough buffer for KeywordFilter | |
568 FilterByteChannel filters = new FilterByteChannel(check, repo.getFiltersFromWorkingDirToRepo(p)); | 569 FilterByteChannel filters = new FilterByteChannel(check, repo.getFiltersFromWorkingDirToRepo(p)); |
569 Preview preview = Adaptable.Factory.getAdapter(filters, Preview.class, null); | 570 Preview preview = Adaptable.Factory.getAdapter(filters, Preview.class, null); |
570 if (preview != null) { | 571 if (preview != null) { |
571 while (is.read(fb) != -1) { | 572 while (is.read(fb) != -1) { |
572 fb.flip(); | 573 fb.flip(); |