Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/TestPhases.java @ 623:fedc54356091
Update tests for Windows; TestCommit: use copy of a repo (not clone) to preserve old timestamps
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 20 May 2013 18:35:13 +0200 |
parents | ba36f66c32b4 |
children | 6526d8adbc0f |
comparison
equal
deleted
inserted
replaced
622:4e6179bde4fc | 623:fedc54356091 |
---|---|
83 private static HgPhase[] readPhases(HgRepository repo) throws Exception { | 83 private static HgPhase[] readPhases(HgRepository repo) throws Exception { |
84 HgPhase[] result = new HgPhase[repo.getChangelog().getRevisionCount()]; | 84 HgPhase[] result = new HgPhase[repo.getChangelog().getRevisionCount()]; |
85 OutputParser.Stub output = new OutputParser.Stub(); | 85 OutputParser.Stub output = new OutputParser.Stub(); |
86 ExecHelper eh = new ExecHelper(output, repo.getWorkingDir()); | 86 ExecHelper eh = new ExecHelper(output, repo.getWorkingDir()); |
87 eh.run("hg", "phase", "-r", "0:-1"); | 87 eh.run("hg", "phase", "-r", "0:-1"); |
88 assertEquals("Perhaps, older Mercurial version, with no hg phase command support?", 0, eh.getExitValue()); | |
88 Matcher m = Pattern.compile("(\\d+): (\\w+)$", Pattern.MULTILINE).matcher(output.result()); | 89 Matcher m = Pattern.compile("(\\d+): (\\w+)$", Pattern.MULTILINE).matcher(output.result()); |
89 int i = 0; | 90 int i = 0; |
90 while (m.find()) { | 91 while (m.find()) { |
91 int x = Integer.parseInt(m.group(1)); | 92 int x = Integer.parseInt(m.group(1)); |
92 assert x == i; | 93 assert x == i; |