comparison src/org/tmatesoft/hg/core/HgIncomingCommand.java @ 698:822f3a83ff57

in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 06 Aug 2013 21:18:33 +0200
parents 6526d8adbc0f
children
comparison
equal deleted inserted replaced
697:24f4efedc9d5 698:822f3a83ff57
153 localIndex = localRepo.getChangelog().getRevisionCount(); 153 localIndex = localRepo.getChangelog().getRevisionCount();
154 } 154 }
155 155
156 public void next(int revisionNumber, Nodeid nodeid, RawChangeset cset) throws HgRuntimeException { 156 public void next(int revisionNumber, Nodeid nodeid, RawChangeset cset) throws HgRuntimeException {
157 if (parentHelper.knownNode(nodeid)) { 157 if (parentHelper.knownNode(nodeid)) {
158 if (!common.contains(nodeid)) { 158 // FIXME getCommon() and remote.changegroup do not work together nicely.
159 throw new HgInvalidStateException("Bundle shall not report known nodes other than roots we've supplied"); 159 // e.g. for hgtest-annotate-merge repository and TestIncoming, common reports r0 and r5 (ancestor of r5)
160 } 160 // because there's a distinct branch from r0 (in addition to those after r5).
161 // remote.changegroup however answers with revisions that are children of either,
162 /// so revisions 0..5 are reported as well and the next check fails. Instead, shall pass
163 // not common, but 'first to load' to remote.changegroup() or use another method (e.g. getbundle)
164 // Note, sending r5 only (i.e. checking for ancestors in common) won't help, changegroup sends children of
165 // requested roots only, and doesn't look for anything else
166 // if (!common.contains(nodeid)) {
167 // throw new HgInvalidStateException("Bundle shall not report known nodes other than roots we've supplied");
168 // }
161 return; 169 return;
162 } 170 }
163 transformer.next(localIndex++, nodeid, cset); 171 transformer.next(localIndex++, nodeid, cset);
164 } 172 }
165 }); 173 });