/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: Canonical.com Patch Queue Manager
  • Date: 2009-12-21 06:03:07 UTC
  • mfrom: (4665.7.3 serve-init)
  • Revision ID: pqm@pqm.ubuntu.com-20091221060307-uvja3vdy1o6dzzy0
(mbp) example debian init script

Show diffs side-by-side

added added

removed removed

Lines of Context:
1267
1267
        if self._dirty:
1268
1268
            raise AssertionError("attempting to write an inventory when the "
1269
1269
                "dirstate is dirty will lose pending changes")
1270
 
        self.current_dirstate().set_state_from_inventory(inv)
1271
 
        self._make_dirty(reset_inventory=False)
1272
 
        if self._inventory is not None:
 
1270
        had_inventory = self._inventory is not None
 
1271
        # Setting self._inventory = None forces the dirstate to regenerate the
 
1272
        # working inventory. We do this because self.inventory may be inv, or
 
1273
        # may have been modified, and either case would prevent a clean delta
 
1274
        # being created.
 
1275
        self._inventory = None
 
1276
        # generate a delta,
 
1277
        delta = inv._make_delta(self.inventory)
 
1278
        # and apply it.
 
1279
        self.apply_inventory_delta(delta)
 
1280
        if had_inventory:
1273
1281
            self._inventory = inv
1274
1282
        self.flush()
1275
1283
 
1439
1447
                if basis_root_id is not None:
1440
1448
                    wt._set_root_id(basis_root_id)
1441
1449
                    wt.flush()
1442
 
                # If content filtering is supported, do not use the accelerator
1443
 
                # tree - the cost of transforming the content both ways and
1444
 
                # checking for changed content can outweight the gains it gives.
1445
 
                # Note: do NOT move this logic up higher - using the basis from
1446
 
                # the accelerator tree is still desirable because that can save
1447
 
                # a minute or more of processing on large trees!
1448
 
                # The original tree may not have the same content filters
1449
 
                # applied so we can't safely build the inventory delta from
1450
 
                # the source tree.
1451
1450
                if wt.supports_content_filtering():
1452
 
                    if hardlink:
1453
 
                        # see https://bugs.edge.launchpad.net/bzr/+bug/408193
1454
 
                        trace.warning("hardlinking working copy files is not currently "
1455
 
                            "supported in %r" % (wt,))
1456
 
                    accelerator_tree = None
 
1451
                    # The original tree may not have the same content filters
 
1452
                    # applied so we can't safely build the inventory delta from
 
1453
                    # the source tree.
1457
1454
                    delta_from_tree = False
1458
1455
                else:
1459
1456
                    delta_from_tree = True
2019
2016
            output. An unversioned file is defined as one with (False, False)
2020
2017
            for the versioned pair.
2021
2018
        """
2022
 
        # NB: show_status depends on being able to pass in non-versioned files
2023
 
        # and report them as unknown
2024
2019
        # TODO: handle extra trees in the dirstate.
2025
2020
        if (extra_trees or specific_files == []):
2026
2021
            # we can't fast-path these cases (yet)