Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/ExceptionInfo.java @ 485:cdd53e5884ae
Do not add anything to exception message in case no details are known
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 09 Aug 2012 15:45:18 +0200 |
parents | 2bf6f917a7e5 |
children |
comparison
equal
deleted
inserted
replaced
484:ae4d6604debd | 485:cdd53e5884ae |
---|---|
119 sb.append(filename); | 119 sb.append(filename); |
120 sb.append('\''); | 120 sb.append('\''); |
121 sb.append(';'); | 121 sb.append(';'); |
122 sb.append(' '); | 122 sb.append(' '); |
123 } | 123 } |
124 sb.append("rev:"); | 124 if (isRevisionIndexSet() || isRevisionSet()) { |
125 boolean needNodeid = true; | 125 if (isRevisionIndexSet()) { |
126 if (isRevisionIndexSet()) { | 126 if (rangeLeftBoundary != BAD_REVISION || rangeRightBoundary != BAD_REVISION) { |
127 if (rangeLeftBoundary != BAD_REVISION || rangeRightBoundary != BAD_REVISION) { | 127 String sr; |
128 String sr; | 128 switch (getRevisionIndex()) { |
129 switch (getRevisionIndex()) { | 129 case BAD_REVISION: |
130 case BAD_REVISION: | 130 sr = "UNKNOWN"; break; |
131 sr = "UNKNOWN"; break; | 131 case TIP: |
132 case TIP: | 132 sr = "TIP"; break; |
133 sr = "TIP"; break; | 133 case WORKING_COPY: |
134 case WORKING_COPY: | 134 sr = "WORKING-COPY"; break; |
135 sr = "WORKING-COPY"; break; | 135 case NO_REVISION: |
136 case NO_REVISION: | 136 sr = "NO REVISION"; break; |
137 sr = "NO REVISION"; break; | 137 default: |
138 default: | 138 sr = String.valueOf(getRevisionIndex()); |
139 sr = String.valueOf(getRevisionIndex()); | 139 } |
140 } | 140 sb.append(String.format("%s is not from [%d..%d]", sr, rangeLeftBoundary, rangeRightBoundary)); |
141 sb.append(String.format("%s is not from [%d..%d]", sr, rangeLeftBoundary, rangeRightBoundary)); | 141 } else { |
142 } else { | 142 sb.append("rev:"); |
143 sb.append(getRevisionIndex()); | 143 sb.append(getRevisionIndex()); |
144 if (isRevisionSet()) { | 144 if (isRevisionSet()) { |
145 sb.append(':'); | 145 sb.append(':'); |
146 sb.append(getRevision().shortNotation()); | 146 // fall-through to get revision appended |
147 needNodeid = false; | 147 } |
148 } | 148 } |
149 } | 149 } |
150 } | 150 if (isRevisionSet()) { |
151 if (isRevisionSet() && needNodeid) { | 151 sb.append(getRevision().shortNotation()); |
152 sb.append(getRevision().shortNotation()); | 152 } |
153 } | 153 } |
154 if (localFile != null) { | 154 if (localFile != null) { |
155 sb.append(';'); | 155 sb.append(';'); |
156 sb.append(' '); | 156 sb.append(' '); |
157 sb.append(" file:"); | 157 sb.append(" file:"); |