Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/Internals.java @ 539:9edfd5a223b8
Commit: handle empty repository case
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 13 Feb 2013 18:44:58 +0100 |
parents | 0f6fa88e2162 |
children | 6ca3d0c5b4bc |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/Internals.java Tue Feb 05 22:30:21 2013 +0100 +++ b/src/org/tmatesoft/hg/internal/Internals.java Wed Feb 13 18:44:58 2013 +0100 @@ -98,7 +98,6 @@ private final boolean shallCacheRevlogsInRepo; private final DataAccessProvider dataAccess; - @SuppressWarnings("unused") private final int requiresFlags; private final PathRewrite dataPathHelper; // access to file storage area (usually under .hg/store/data/), with filenames mangled @@ -200,8 +199,11 @@ } public EncodingHelper buildFileNameEncodingHelper() { - SessionContext ctx = repo.getSessionContext(); - return new EncodingHelper(getFileEncoding(ctx), ctx); + return new EncodingHelper(getFilenameEncoding(), repo.getSessionContext()); + } + + /*package-local*/ Charset getFilenameEncoding() { + return getFileEncoding(getSessionContext()); } /*package-local*/ static Charset getFileEncoding(SessionContext ctx) { @@ -230,6 +232,9 @@ return dataPathHelper.rewrite(df.getPath().toString()); } + public int getRequiresFlags() { + return requiresFlags; + } public static boolean runningOnWindows() { return System.getProperty("os.name").indexOf("Windows") != -1;