Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgBundle.java @ 418:528b6780a8bd
A bit of FIXME cleanup (mostly degraded to TODO post 1.0), comments and javadoc
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 22 Mar 2012 21:02:20 +0100 |
| parents | 994b5813a925 |
| children | 9c9c442b5f2e |
comparison
equal
deleted
inserted
replaced
| 417:ccd7d25e5aea | 418:528b6780a8bd |
|---|---|
| 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 * |
| 148 final Nodeid base = ge.firstParent(); | 148 final Nodeid base = ge.firstParent(); |
| 149 if (!changelog.isKnown(base) /*only first parent, that's Bundle contract*/) { | 149 if (!changelog.isKnown(base) /*only first parent, that's Bundle contract*/) { |
| 150 throw new IllegalStateException(String.format("Revision %s needs a parent %s, which is missing in the supplied repo %s", ge.node().shortNotation(), base.shortNotation(), hgRepo.toString())); | 150 throw new IllegalStateException(String.format("Revision %s needs a parent %s, which is missing in the supplied repo %s", ge.node().shortNotation(), base.shortNotation(), hgRepo.toString())); |
| 151 } | 151 } |
| 152 ByteArrayChannel bac = new ByteArrayChannel(); | 152 ByteArrayChannel bac = new ByteArrayChannel(); |
| 153 changelog.rawContent(base, bac); // FIXME get DataAccess directly, to avoid | 153 changelog.rawContent(base, bac); // TODO post-1.0 get DataAccess directly, to avoid |
| 154 // extra byte[] (inside ByteArrayChannel) duplication just for the sake of subsequent ByteArrayDataChannel wrap. | 154 // extra byte[] (inside ByteArrayChannel) duplication just for the sake of subsequent ByteArrayDataChannel wrap. |
| 155 prevRevContent = new ByteArrayDataAccess(bac.toArray()); | 155 prevRevContent = new ByteArrayDataAccess(bac.toArray()); |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 // | 158 // |
