comparison src/org/tmatesoft/hg/internal/StoragePathHelper.java @ 418:528b6780a8bd

A bit of FIXME cleanup (mostly degraded to TODO post 1.0), comments and javadoc
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 22 Mar 2012 21:02:20 +0100
parents 464b4404e75d
children 48f993aa2f41
comparison
equal deleted inserted replaced
417:ccd7d25e5aea 418:528b6780a8bd
59 csEncoder = fsEncoding.newEncoder(); // FIXME catch exception and rethrow as our's RT 59 csEncoder = fsEncoding.newEncoder(); // FIXME catch exception and rethrow as our's RT
60 byteEncodingBuf = ByteBuffer.allocate(Math.round(csEncoder.maxBytesPerChar()) + 1/*in fact, need ceil, hence +1*/); 60 byteEncodingBuf = ByteBuffer.allocate(Math.round(csEncoder.maxBytesPerChar()) + 1/*in fact, need ceil, hence +1*/);
61 charEncodingBuf = CharBuffer.allocate(1); 61 charEncodingBuf = CharBuffer.allocate(1);
62 } 62 }
63 63
64 // FIXME document what path argument is, whether it includes .i or .d, and whether it's 'normalized' (slashes) or not. 64 /**
65 // since .hg/store keeps both .i files and files without extension (e.g. fncache), guees, for data == false 65 * path argument is repository-relative name of the user's file.
66 // we shall assume path has extension 66 * It has to be normalized (slashes) and shall not include extension .i or .d.
67 */
67 public CharSequence rewrite(CharSequence p) { 68 public CharSequence rewrite(CharSequence p) {
68 final String STR_STORE = "store/"; 69 final String STR_STORE = "store/";
69 final String STR_DATA = "data/"; 70 final String STR_DATA = "data/";
70 final String STR_DH = "dh/"; 71 final String STR_DH = "dh/";
71 final String reservedChars = "\\:*?\"<>|"; 72 final String reservedChars = "\\:*?\"<>|";