comparison mercurial/bundlerepo.py @ 16195:40cc20042fb4 stable

bundlerepo: bundle repos should be non-publishing (issue3266) Bundle repo contains both the bundle content and the content of the repository used as a base. This create bugs with phases exchange because the "remote" repository claim to contains changeset it does not. The easiest way to fix this bug is to ensure a bundle repo as non publishing. This way changeset will be seen in the same phase than locally. This patch does not alter in which phase bundle revision are seen. For now they are seen as if an old client had add them on the remote: They inherit their phase from parent whatever the parent is. This is to be fixed in a later patch
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 29 Feb 2012 14:41:11 +0100
parents 4b7aa1c899dc
children d7d64b89a65c
comparison
equal deleted inserted replaced
16194:6ba530122d8b 16195:40cc20042fb4
166 localrepo.localrepository.__init__(self, ui, path) 166 localrepo.localrepository.__init__(self, ui, path)
167 except error.RepoError: 167 except error.RepoError:
168 self._tempparent = tempfile.mkdtemp() 168 self._tempparent = tempfile.mkdtemp()
169 localrepo.instance(ui, self._tempparent, 1) 169 localrepo.instance(ui, self._tempparent, 1)
170 localrepo.localrepository.__init__(self, ui, self._tempparent) 170 localrepo.localrepository.__init__(self, ui, self._tempparent)
171 self.ui.setconfig('phases', 'publish', False)
171 172
172 if path: 173 if path:
173 self._url = 'bundle:' + util.expandpath(path) + '+' + bundlename 174 self._url = 'bundle:' + util.expandpath(path) + '+' + bundlename
174 else: 175 else:
175 self._url = 'bundle:' + bundlename 176 self._url = 'bundle:' + bundlename