Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgException.java @ 320:678e326fd27c
Issue 15: Exception accessing oddly named file from history
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 30 Sep 2011 06:22:11 +0200 |
parents | 6d1804fe0ed7 |
children | 2fadf8695f8a |
comparison
equal
deleted
inserted
replaced
319:fa4aea41746e | 320:678e326fd27c |
---|---|
82 return this; | 82 return this; |
83 } | 83 } |
84 | 84 |
85 protected void appendDetails(StringBuilder sb) { | 85 protected void appendDetails(StringBuilder sb) { |
86 if (filename != null) { | 86 if (filename != null) { |
87 sb.append("file:'"); | |
87 sb.append(filename); | 88 sb.append(filename); |
88 sb.append(':'); | 89 sb.append('\''); |
90 sb.append(';'); | |
89 sb.append(' '); | 91 sb.append(' '); |
90 } | 92 } |
93 sb.append("rev:"); | |
91 if (revNumber != BAD_REVISION) { | 94 if (revNumber != BAD_REVISION) { |
92 sb.append(revNumber); | 95 sb.append(revNumber); |
93 if (revision != null) { | 96 if (revision != null) { |
94 sb.append(':'); | 97 sb.append(':'); |
95 } | 98 } |
97 if (revision != null) { | 100 if (revision != null) { |
98 sb.append(revision.shortNotation()); | 101 sb.append(revision.shortNotation()); |
99 } | 102 } |
100 } | 103 } |
101 | 104 |
105 @Override | |
106 public String toString() { | |
107 StringBuilder sb = new StringBuilder(super.toString()); | |
108 sb.append(' '); | |
109 sb.append('('); | |
110 appendDetails(sb); | |
111 sb.append(')'); | |
112 return sb.toString(); | |
113 } | |
102 // /* XXX CONSIDER capability to pass extra information about errors */ | 114 // /* XXX CONSIDER capability to pass extra information about errors */ |
103 // public static class Status { | 115 // public static class Status { |
104 // public Status(String message, Throwable cause, int errorCode, Object extraData) { | 116 // public Status(String message, Throwable cause, int errorCode, Object extraData) { |
105 // } | 117 // } |
106 // } | 118 // } |