comparison src/org/tmatesoft/hg/internal/PhasesHelper.java @ 501:d2f6ab541330

Change the way extensions are accessed (with ExtensionsManager now), add preliminary Rebase extension support
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 29 Oct 2012 19:04:13 +0100
parents ba36f66c32b4
children 6526d8adbc0f
comparison
equal deleted inserted replaced
500:465316bf97e8 501:d2f6ab541330
133 String[] lc = line.trim().split("\\s+"); 133 String[] lc = line.trim().split("\\s+");
134 if (lc.length == 0) { 134 if (lc.length == 0) {
135 continue; 135 continue;
136 } 136 }
137 if (lc.length != 2) { 137 if (lc.length != 2) {
138 repo.getContext().getLog().dump(getClass(), Warn, "Bad line in phaseroots:%s", line); 138 repo.getSessionContext().getLog().dump(getClass(), Warn, "Bad line in phaseroots:%s", line);
139 continue; 139 continue;
140 } 140 }
141 int phaseIndex = Integer.parseInt(lc[0]); 141 int phaseIndex = Integer.parseInt(lc[0]);
142 Nodeid rootRev = Nodeid.fromAscii(lc[1]); 142 Nodeid rootRev = Nodeid.fromAscii(lc[1]);
143 if (!getRepo().getChangelog().isKnown(rootRev)) { 143 if (!getRepo().getChangelog().isKnown(rootRev)) {
144 repo.getContext().getLog().dump(getClass(), Warn, "Phase(%d) root node %s doesn't exist in the repository, ignored.", phaseIndex, rootRev); 144 repo.getSessionContext().getLog().dump(getClass(), Warn, "Phase(%d) root node %s doesn't exist in the repository, ignored.", phaseIndex, rootRev);
145 continue; 145 continue;
146 } 146 }
147 HgPhase phase = HgPhase.parse(phaseIndex); 147 HgPhase phase = HgPhase.parse(phaseIndex);
148 List<Nodeid> roots = phase2roots.get(phase); 148 List<Nodeid> roots = phase2roots.get(phase);
149 if (roots == null) { 149 if (roots == null) {
158 } finally { 158 } finally {
159 if (br != null) { 159 if (br != null) {
160 try { 160 try {
161 br.close(); 161 br.close();
162 } catch (IOException ex) { 162 } catch (IOException ex) {
163 repo.getContext().getLog().dump(getClass(), Info, ex, null); 163 repo.getSessionContext().getLog().dump(getClass(), Info, ex, null);
164 // ignore the exception otherwise 164 // ignore the exception otherwise
165 } 165 }
166 } 166 }
167 } 167 }
168 return Boolean.TRUE; 168 return Boolean.TRUE;