Mercurial > hg4j
changeset 11:d46773d89a19
Boundary error in dirstate entry, explicit encoding to face troubles (if any) asap.
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sat, 25 Dec 2010 22:19:31 +0100 |
parents | 382cfe9463db |
children | 181fccc176ef |
files | design.txt src/com/tmate/hgkit/ll/HgDirstate.java |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/design.txt Sat Dec 25 21:50:12 2010 +0100 +++ b/design.txt Sat Dec 25 22:19:31 2010 +0100 @@ -26,6 +26,7 @@ *input stream impl + lifecycle. Step forward with FileChannel and ByteBuffer, although questionable accomplishment (looks bit complicated, cumbersome) calculate sha1 digest for file to see I can deal with nodeid +DataAccess - collect debug info (buffer misses, file size/total read operations) to find out better strategy to buffer size detection. delta merge Changeset to get index (local revision number)
--- a/src/com/tmate/hgkit/ll/HgDirstate.java Sat Dec 25 21:50:12 2010 +0100 +++ b/src/com/tmate/hgkit/ll/HgDirstate.java Sat Dec 25 22:19:31 2010 +0100 @@ -62,8 +62,8 @@ da.readBytes(name, 0, nameLen); for (int i = 0; i < nameLen; i++) { if (name[i] == 0) { - fn1 = new String(name, 0, i); - fn2 = new String(name, i+1, nameLen); + fn1 = new String(name, 0, i, "UTF-8"); // XXX unclear from documentation what encoding is used there + fn2 = new String(name, i+1, nameLen - i - 1, "UTF-8"); // need to check with different system codepages break; } }