diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -168,6 +168,7 @@ class bundlerepository(localrepo.localre self._tempparent = tempfile.mkdtemp() localrepo.instance(ui, self._tempparent, 1) localrepo.localrepository.__init__(self, ui, self._tempparent) + self.ui.setconfig('phases', 'publish', False) if path: self._url = 'bundle:' + util.expandpath(path) + '+' + bundlename diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t --- a/tests/test-phases-exchange.t +++ b/tests/test-phases-exchange.t @@ -465,6 +465,38 @@ initial setup o 0 public a-A - 054250a37db4 +Pulling from bundle does not alter phases of changeset not present in the bundle + + $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg + 5 changesets found + $ hg pull ../partial-bundle.hg + pulling from ../partial-bundle.hg + searching for changes + no changes found + $ hgph + @ 10 draft a-H - 967b449fbc94 + | + | o 9 draft a-G - 3e27b6f1eee1 + | | + | o 8 draft a-F - b740e3e5c05d + | | + | o 7 draft a-E - e9f537e46dea + | | + +---o 6 public n-B - 145e75495359 + | | + o | 5 public n-A - d6bcb4f74035 + | | + o | 4 public b-A - f54f1bb90ff3 + | | + | o 3 public a-D - b555f63b6063 + | | + | o 2 public a-C - 54acac6f23ab + |/ + o 1 public a-B - 548a3d25dbf0 + | + o 0 public a-A - 054250a37db4 + + Pushing to Publish=False (unknown changeset) $ hg push ../mu -r b740e3e5c05d # a-F