~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_3.py

  • Committer: Vincent Ladeuil
  • Date: 2016-02-07 18:23:13 UTC
  • mto: (6615.3.1 2.7)
  • mto: This revision was merged to the branch mainline in revision 6620.
  • Revision ID: v.ladeuil+lp@free.fr-20160207182313-jwz7z3vj4mpyjn7y
Ensure http://pad.lv/1323805 won't come back.

Since the 2.6.0 release pypi policy changed and release tarballs can't be
hosted on launchpad anymore, they have to be uploaded to
http://pypi.python.org/pypi


This fixes setup.py sdist to generate the right tarball with nearly the same
content as the one produced for 2.7.0.

Such a tarball have been uploaded to pypi properly signed and tested for
installation in venv.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    )
37
37
from bzrlib.lockable_files import LockableFiles
38
38
from bzrlib.lockdir import LockDir
 
39
from bzrlib.mutabletree import MutableTree
39
40
from bzrlib.transport.local import LocalTransport
40
41
from bzrlib.workingtree import (
41
42
    InventoryWorkingTree,
195
196
        control_files = self._open_control_files(a_bzrdir)
196
197
        control_files.create_lock()
197
198
        control_files.lock_write()
198
 
        transport.put_bytes('format', self.get_format_string(),
 
199
        transport.put_bytes('format', self.as_string(),
199
200
            mode=a_bzrdir._get_file_mode())
200
201
        if from_branch is not None:
201
202
            branch = from_branch
220
221
        try:
221
222
            basis_tree = branch.repository.revision_tree(revision_id)
222
223
            # only set an explicit root id if there is one to set.
223
 
            if basis_tree.inventory.root is not None:
 
224
            if basis_tree.get_root_id() is not None:
224
225
                wt.set_root_id(basis_tree.get_root_id())
225
226
            if revision_id == _mod_revision.NULL_REVISION:
226
227
                wt.set_parent_trees([])
227
228
            else:
228
229
                wt.set_parent_trees([(revision_id, basis_tree)])
229
230
            transform.build_tree(basis_tree, wt)
 
231
            for hook in MutableTree.hooks['post_build_tree']:
 
232
                hook(wt)
230
233
        finally:
231
234
            # Unlock in this order so that the unlock-triggers-flush in
232
235
            # WorkingTree is given a chance to fire.