Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgRemoteRepository.java @ 403:2747b0723867
FIXMEs: work on exceptions and javadoc
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 05 Mar 2012 14:50:51 +0100 |
parents | 994b5813a925 |
children | bb278ccf9866 |
comparison
equal
deleted
inserted
replaced
402:1fcc7f7b6d65 | 403:2747b0723867 |
---|---|
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 * |
230 if (possiblyEmptyNextLine) { | 230 if (possiblyEmptyNextLine) { |
231 // newline follows newline; | 231 // newline follows newline; |
232 assert currRange == null; | 232 assert currRange == null; |
233 assert currRangeList == null; | 233 assert currRangeList == null; |
234 if (!rangeItr.hasNext()) { | 234 if (!rangeItr.hasNext()) { |
235 throw new HgBadStateException(); | 235 throw new HgBadStateException("Internal error"); |
236 } | 236 } |
237 rv.put(rangeItr.next(), Collections.<Nodeid>emptyList()); | 237 rv.put(rangeItr.next(), Collections.<Nodeid>emptyList()); |
238 } else { | 238 } else { |
239 if (currRange == null || currRangeList == null) { | 239 if (currRange == null || currRangeList == null) { |
240 throw new HgBadStateException(); | 240 throw new HgBadStateException("Internal error"); |
241 } | 241 } |
242 // indicate next range value is needed | 242 // indicate next range value is needed |
243 currRange = null; | 243 currRange = null; |
244 currRangeList = null; | 244 currRangeList = null; |
245 possiblyEmptyNextLine = true; | 245 possiblyEmptyNextLine = true; |
246 } | 246 } |
247 } else { | 247 } else { |
248 possiblyEmptyNextLine = false; | 248 possiblyEmptyNextLine = false; |
249 if (currRange == null) { | 249 if (currRange == null) { |
250 if (!rangeItr.hasNext()) { | 250 if (!rangeItr.hasNext()) { |
251 throw new HgBadStateException(); | 251 throw new HgBadStateException("Internal error"); |
252 } | 252 } |
253 currRange = rangeItr.next(); | 253 currRange = rangeItr.next(); |
254 currRangeList = new LinkedList<Nodeid>(); | 254 currRangeList = new LinkedList<Nodeid>(); |
255 rv.put(currRange, currRangeList); | 255 rv.put(currRange, currRangeList); |
256 } | 256 } |