exchange: do not attempt clone bundle if local repo is non-empty (issue4932) stable
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 03 Nov 2015 12:16:54 -0800
branchstable
changeset 26855 9350f00a7b23
parent 26854 cb4b0ec54990
child 26856 baa77652be68
exchange: do not attempt clone bundle if local repo is non-empty (issue4932)
mercurial/exchange.py
tests/test-clonebundles.t
--- a/mercurial/exchange.py	Tue Nov 03 12:15:14 2015 -0800
+++ b/mercurial/exchange.py	Tue Nov 03 12:16:54 2015 -0800
@@ -1658,6 +1658,10 @@
     if not repo.ui.configbool('experimental', 'clonebundles', False):
         return
 
+    # Only run if local repo is empty.
+    if len(repo):
+        return
+
     if pullop.heads:
         return
 
--- a/tests/test-clonebundles.t	Tue Nov 03 12:15:14 2015 -0800
+++ b/tests/test-clonebundles.t	Tue Nov 03 12:16:54 2015 -0800
@@ -167,12 +167,6 @@
   $ cd partial-clone
   $ hg pull
   pulling from http://localhost:$HGPORT/
-  applying clone bundle from http://localhost:$HGPORT1/partial.hg
-  adding changesets
-  adding manifests
-  adding file changes
-  added 0 changesets with 0 changes to 1 files
-  finished applying clone bundle
   searching for changes
   adding changesets
   adding manifests