Mercurial > hg4j
comparison src/org/tmatesoft/hg/core/HgFileRevision.java @ 396:0ae53c32ecef
Straighten out exceptions thrown when file access failed - three is too much
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 23 Feb 2012 01:06:24 +0100 |
| parents | 2fadf8695f8a |
| children | ee8264d80747 |
comparison
equal
deleted
inserted
replaced
| 395:4732fffff58a | 396:0ae53c32ecef |
|---|---|
| 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 * |
| 97 parents = new Pair<Nodeid, Nodeid>(Nodeid.fromBinary(p1, 0), Nodeid.fromBinary(p2, 0)); | 97 parents = new Pair<Nodeid, Nodeid>(Nodeid.fromBinary(p1, 0), Nodeid.fromBinary(p2, 0)); |
| 98 } | 98 } |
| 99 return parents; | 99 return parents; |
| 100 } | 100 } |
| 101 | 101 |
| 102 public void putContentTo(ByteChannel sink) throws HgDataStreamException, HgInvalidControlFileException, CancelledException { | 102 public void putContentTo(ByteChannel sink) throws HgException, CancelledException { |
| 103 HgDataFile fn = repo.getFileNode(path); | 103 HgDataFile fn = repo.getFileNode(path); |
| 104 int revisionIndex = fn.getRevisionIndex(revision); | 104 int revisionIndex = fn.getRevisionIndex(revision); |
| 105 fn.contentWithFilters(revisionIndex, sink); | 105 fn.contentWithFilters(revisionIndex, sink); |
| 106 } | 106 } |
| 107 | 107 |
| 108 private void checkCopy() throws HgInvalidControlFileException, HgDataStreamException { | 108 private void checkCopy() throws HgException { |
| 109 HgDataFile fn = repo.getFileNode(path); | 109 HgDataFile fn = repo.getFileNode(path); |
| 110 if (fn.isCopy()) { | 110 if (fn.isCopy()) { |
| 111 if (fn.getRevision(0).equals(revision)) { | 111 if (fn.getRevision(0).equals(revision)) { |
| 112 // this HgFileRevision represents first revision of the copy | 112 // this HgFileRevision represents first revision of the copy |
| 113 isCopy = Boolean.TRUE; | 113 isCopy = Boolean.TRUE; |
