diff src/org/tmatesoft/hg/core/HgPushCommand.java @ 670:52af7f62e731

AIOOBE in BundleGenerator.ChunkGenerator.iterate when there are no outgoing changes on push
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 12 Jul 2013 15:27:43 +0200
parents d25f0324a27a
children 002ed1b2baad
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgPushCommand.java	Thu Jul 11 20:49:33 2013 +0200
+++ b/src/org/tmatesoft/hg/core/HgPushCommand.java	Fri Jul 12 15:27:43 2013 +0200
@@ -87,15 +87,17 @@
 			} else {
 				outgoing = new RevisionSet(l);
 			}
-			//
-			// prepare bundle
-			BundleGenerator bg = new BundleGenerator(implRepo);
-			File bundleFile = bg.create(outgoing.asList());
-			progress.worked(20);
-			HgBundle b = new HgLookup(repo.getSessionContext()).loadBundle(bundleFile);
-			//
-			// send changes
-			remoteRepo.unbundle(b, comparator.getRemoteHeads());
+			if (!outgoing.isEmpty()) {
+				//
+				// prepare bundle
+				BundleGenerator bg = new BundleGenerator(implRepo);
+				File bundleFile = bg.create(outgoing.asList());
+				progress.worked(20);
+				HgBundle b = new HgLookup(repo.getSessionContext()).loadBundle(bundleFile);
+				//
+				// send changes
+				remoteRepo.unbundle(b, comparator.getRemoteHeads());
+			} // update phase information nevertheless
 			progress.worked(20);
 			//
 			// update phase information