Mercurial > hg4j
comparison cmdline/org/tmatesoft/hg/console/Outgoing.java @ 178:62665d8f0686
Complete logic to discover all branches missing locally. Most of wire protocol in HgRemoteRepository
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 06 Apr 2011 01:34:16 +0200 |
parents | a8df7162ec75 |
children | cd3371670f0b |
comparison
equal
deleted
inserted
replaced
177:e10225daface | 178:62665d8f0686 |
---|---|
118 } | 118 } |
119 // can't check nodes between checkUp2Head element and local heads, remote might have distinct descendants sequence | 119 // can't check nodes between checkUp2Head element and local heads, remote might have distinct descendants sequence |
120 for (RemoteBranch rb : checkUp2Head) { | 120 for (RemoteBranch rb : checkUp2Head) { |
121 // rb.root is known locally | 121 // rb.root is known locally |
122 List<Nodeid> remoteRevisions = hgRemote.between(rb.head, rb.root); | 122 List<Nodeid> remoteRevisions = hgRemote.between(rb.head, rb.root); |
123 // between gives result from head to root, I'd like to go in reverse direction | |
124 Collections.reverse(remoteRevisions); | |
125 if (remoteRevisions.isEmpty()) { | 123 if (remoteRevisions.isEmpty()) { |
126 // head is immediate child | 124 // head is immediate child |
127 common.add(rb.root); | 125 common.add(rb.root); |
128 } else { | 126 } else { |
127 // between gives result from head to root, I'd like to go in reverse direction | |
128 Collections.reverse(remoteRevisions); | |
129 Nodeid root = rb.root; | 129 Nodeid root = rb.root; |
130 while(!remoteRevisions.isEmpty()) { | 130 while(!remoteRevisions.isEmpty()) { |
131 Nodeid n = remoteRevisions.remove(0); | 131 Nodeid n = remoteRevisions.remove(0); |
132 if (pwLocal.knownNode(n)) { | 132 if (pwLocal.knownNode(n)) { |
133 if (remoteRevisions.isEmpty()) { | 133 if (remoteRevisions.isEmpty()) { |