/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Aaron Bentley
  • Date: 2008-03-03 16:52:41 UTC
  • mfrom: (3144.3.11 fix-conflict-handling)
  • mto: This revision was merged to the branch mainline in revision 3250.
  • Revision ID: aaron@aaronbentley.com-20080303165241-0k2c7ggs6kr9q6hf
Merge with fix-conflict-handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
1259
1259
        return "Working tree format 4"
1260
1260
 
1261
1261
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None,
1262
 
                   accelerator_tree=None):
 
1262
                   accelerator_tree=None, hardlink=False):
1263
1263
        """See WorkingTreeFormat.initialize().
1264
1264
 
1265
1265
        :param revision_id: allows creating a working tree at a different
1268
1268
            contents more quickly than the revision tree, i.e. a workingtree.
1269
1269
            The revision tree will be used for cases where accelerator_tree's
1270
1270
            content is different.
 
1271
        :param hardlink: If true, hard-link files from accelerator_tree,
 
1272
            where possible.
1271
1273
 
1272
1274
        These trees get an initial random root id, if their repository supports
1273
1275
        rich root data, TREE_ROOT otherwise.
1320
1322
            else:
1321
1323
                parents_list = [(revision_id, basis)]
1322
1324
            basis.lock_read()
1323
 
            wt.set_parent_trees(parents_list, allow_leftmost_as_ghost=True)
1324
 
            wt.flush()
1325
 
            # if the basis has a root id we have to use that; otherwise we use
1326
 
            # a new random one
1327
 
            basis_root_id = basis.get_root_id()
1328
 
            if basis_root_id is not None:
1329
 
                wt._set_root_id(basis_root_id)
 
1325
            try:
 
1326
                wt.set_parent_trees(parents_list, allow_leftmost_as_ghost=True)
1330
1327
                wt.flush()
1331
 
            transform.build_tree(basis, wt, accelerator_tree)
1332
 
            basis.unlock()
 
1328
                # if the basis has a root id we have to use that; otherwise we
 
1329
                # use a new random one
 
1330
                basis_root_id = basis.get_root_id()
 
1331
                if basis_root_id is not None:
 
1332
                    wt._set_root_id(basis_root_id)
 
1333
                    wt.flush()
 
1334
                transform.build_tree(basis, wt, accelerator_tree,
 
1335
                                     hardlink=hardlink)
 
1336
            finally:
 
1337
                basis.unlock()
1333
1338
        finally:
1334
1339
            control_files.unlock()
1335
1340
            wt.unlock()
1951
1956
                                                 path_utf8=old_path)
1952
1957
                    # update the source details variable to be the real
1953
1958
                    # location.
 
1959
                    if old_entry == (None, None):
 
1960
                        raise errors.CorruptDirstate(state._filename,
 
1961
                            "entry '%s/%s' is considered renamed from %r"
 
1962
                            " but source does not exist\n"
 
1963
                            "entry: %s" % (entry[0][0], entry[0][1], old_path, entry))
1954
1964
                    source_details = old_entry[1][source_index]
1955
1965
                    source_minikind = source_details[0]
1956
1966
                else: