Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgIncomingCommand.java @ 423:9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 23 Mar 2012 22:51:18 +0100 |
parents | 7f136a3fa671 |
children | 31a89587eb04 |
comparison
equal
deleted
inserted
replaced
422:5d1cc7366d04 | 423:9c9c442b5f2e |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011 TMate Software Ltd | 2 * Copyright (c) 2011-2012 TMate Software Ltd |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or modify | 4 * This program is free software; you can redistribute it and/or modify |
5 * it under the terms of the GNU General Public License as published by | 5 * it under the terms of the GNU General Public License as published by |
6 * the Free Software Foundation; version 2 of the License. | 6 * the Free Software Foundation; version 2 of the License. |
7 * | 7 * |
27 | 27 |
28 import org.tmatesoft.hg.internal.RepositoryComparator; | 28 import org.tmatesoft.hg.internal.RepositoryComparator; |
29 import org.tmatesoft.hg.internal.RepositoryComparator.BranchChain; | 29 import org.tmatesoft.hg.internal.RepositoryComparator.BranchChain; |
30 import org.tmatesoft.hg.repo.HgBundle; | 30 import org.tmatesoft.hg.repo.HgBundle; |
31 import org.tmatesoft.hg.repo.HgChangelog; | 31 import org.tmatesoft.hg.repo.HgChangelog; |
32 import org.tmatesoft.hg.repo.HgInvalidControlFileException; | |
33 import org.tmatesoft.hg.repo.HgInvalidFileException; | |
32 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset; | 34 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset; |
35 import org.tmatesoft.hg.repo.HgInvalidStateException; | |
33 import org.tmatesoft.hg.repo.HgRemoteRepository; | 36 import org.tmatesoft.hg.repo.HgRemoteRepository; |
34 import org.tmatesoft.hg.repo.HgRepository; | 37 import org.tmatesoft.hg.repo.HgRepository; |
35 import org.tmatesoft.hg.util.CancelledException; | 38 import org.tmatesoft.hg.util.CancelledException; |
36 import org.tmatesoft.hg.util.ProgressSupport; | 39 import org.tmatesoft.hg.util.ProgressSupport; |
37 | 40 |
148 } | 151 } |
149 | 152 |
150 public void next(int revisionNumber, Nodeid nodeid, RawChangeset cset) { | 153 public void next(int revisionNumber, Nodeid nodeid, RawChangeset cset) { |
151 if (parentHelper.knownNode(nodeid)) { | 154 if (parentHelper.knownNode(nodeid)) { |
152 if (!common.contains(nodeid)) { | 155 if (!common.contains(nodeid)) { |
153 throw new HgBadStateException("Bundle shall not report known nodes other than roots we've supplied"); | 156 throw new HgInvalidStateException("Bundle shall not report known nodes other than roots we've supplied"); |
154 } | 157 } |
155 return; | 158 return; |
156 } | 159 } |
157 transformer.next(localIndex++, nodeid, cset); | 160 transformer.next(localIndex++, nodeid, cset); |
158 } | 161 } |