[PATCH 2 of 2 STABLE] exchange: do not attempt clone bundle if local repo is non-empty (issue4932)
Gregory Szorc
gregory.szorc at gmail.com
Tue Nov 3 14:17:09 CST 2015
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1446581814 28800
# Tue Nov 03 12:16:54 2015 -0800
# Branch stable
# Node ID 2c0a9941100c292b3062ebd37613027f956712c2
# Parent 7c2360b9eb1f429f205d82fd9d46e8ba092cb9a5
exchange: do not attempt clone bundle if local repo is non-empty (issue4932)
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1657,8 +1657,12 @@ def _maybeapplyclonebundle(pullop):
if not repo.ui.configbool('experimental', 'clonebundles', False):
return
+ # Only run if local repo is empty.
+ if len(repo):
+ return
+
if pullop.heads:
return
if not remote.capable('clonebundles'):
diff --git a/tests/test-clonebundles.t b/tests/test-clonebundles.t
--- a/tests/test-clonebundles.t
+++ b/tests/test-clonebundles.t
@@ -166,14 +166,8 @@ Incremental pull doesn't fetch bundle
$ 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
adding file changes
More information about the Mercurial-devel
mailing list