diff src/org/tmatesoft/hg/util/RegularFileInfo.java @ 476:c02b5710d9ac

Defect: only first file in directory got flags initialized
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 12 Jul 2012 18:07:12 +0200
parents 909306e412e2
children 868b2ffdcd5c
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/RegularFileInfo.java	Thu Jul 12 16:57:40 2012 +0200
+++ b/src/org/tmatesoft/hg/util/RegularFileInfo.java	Thu Jul 12 18:07:12 2012 +0200
@@ -101,6 +101,12 @@
 		return supportsLink && fileFlagsHelper.isSymlink();
 	}
 	
+	@Override
+	public String toString() {
+		char t = exists() ? (isExecutable() ? '*' : (isSymlink() ? '@' : '-')) : '!';
+		return String.format("RegularFileInfo[%s %c]", file.getPath(), t);
+	}
+	
 	private byte[] getLinkTargetBytes() {
 		assert isSymlink();
 		// no idea what encoding Mercurial uses for link targets, assume platform native is ok