comparison src/org/tmatesoft/hg/repo/HgManifest.java @ 608:e1b29756f901

Clean, organize and resolve some TODOs and FIXMEs: minor refactorings and comments
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 07 May 2013 21:27:51 +0200
parents 66f1cc23b906
children 6526d8adbc0f
comparison
equal deleted inserted replaced
607:66f1cc23b906 608:e1b29756f901
107 } 107 }
108 // FALL THROUGH 108 // FALL THROUGH
109 } 109 }
110 throw new IllegalStateException(new String(data, start, length)); 110 throw new IllegalStateException(new String(data, start, length));
111 } 111 }
112 112
113 static Flags parse(int dirstateFileMode) {
114 // source/include/linux/stat.h
115 final int S_IFLNK = 0120000, S_IXUSR = 00100;
116 if ((dirstateFileMode & S_IFLNK) == S_IFLNK) {
117 return Link;
118 }
119 if ((dirstateFileMode & S_IXUSR) == S_IXUSR) {
120 return Exec;
121 }
122 return RegularFile;
123 }
124
113 String nativeString() { 125 String nativeString() {
114 if (this == Exec) { 126 if (this == Exec) {
115 return "x"; 127 return "x";
116 } 128 }
117 if (this == Link) { 129 if (this == Link) {