diff 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
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Outgoing.java	Sat Apr 02 23:05:28 2011 +0200
+++ b/cmdline/org/tmatesoft/hg/console/Outgoing.java	Wed Apr 06 01:34:16 2011 +0200
@@ -120,12 +120,12 @@
 		for (RemoteBranch rb : checkUp2Head) {
 			// rb.root is known locally
 			List<Nodeid> remoteRevisions = hgRemote.between(rb.head, rb.root);
-				// between gives result from head to root, I'd like to go in reverse direction
-			Collections.reverse(remoteRevisions);
 			if (remoteRevisions.isEmpty()) {
 				// head is immediate child
 				common.add(rb.root);
 			} else {
+				// between gives result from head to root, I'd like to go in reverse direction
+				Collections.reverse(remoteRevisions);
 				Nodeid root = rb.root;
 				while(!remoteRevisions.isEmpty()) {
 					Nodeid n = remoteRevisions.remove(0);