comparison src/org/tmatesoft/hg/internal/PhasesHelper.java @ 647:c75297c17867

Location of repository files as enumeration, use file constants instead of plain names
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 25 Jun 2013 18:53:18 +0200
parents 6526d8adbc0f
children 690e71d29bf6
comparison
equal deleted inserted replaced
646:3b7d51ed4c65 647:c75297c17867
16 */ 16 */
17 package org.tmatesoft.hg.internal; 17 package org.tmatesoft.hg.internal;
18 18
19 import static org.tmatesoft.hg.repo.HgPhase.Draft; 19 import static org.tmatesoft.hg.repo.HgPhase.Draft;
20 import static org.tmatesoft.hg.repo.HgPhase.Secret; 20 import static org.tmatesoft.hg.repo.HgPhase.Secret;
21 import static org.tmatesoft.hg.repo.HgRepositoryFiles.Phaseroots;
21 import static org.tmatesoft.hg.util.LogFacility.Severity.Info; 22 import static org.tmatesoft.hg.util.LogFacility.Severity.Info;
22 import static org.tmatesoft.hg.util.LogFacility.Severity.Warn; 23 import static org.tmatesoft.hg.util.LogFacility.Severity.Warn;
23 24
24 import java.io.BufferedReader; 25 import java.io.BufferedReader;
25 import java.io.File; 26 import java.io.File;
132 return HgPhase.Public; 133 return HgPhase.Public;
133 134
134 } 135 }
135 136
136 private Boolean readRoots() throws HgRuntimeException { 137 private Boolean readRoots() throws HgRuntimeException {
137 File phaseroots = repo.getFileFromStoreDir("phaseroots"); // TODO into HgRepositoryFiles 138 File phaseroots = repo.getRepositoryFile(Phaseroots);
138 BufferedReader br = null; 139 BufferedReader br = null;
139 try { 140 try {
140 if (!phaseroots.exists()) { 141 if (!phaseroots.exists()) {
141 return Boolean.FALSE; 142 return Boolean.FALSE;
142 } 143 }