~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

  • Committer: Patrick Regan
  • Date: 2009-12-02 20:34:07 UTC
  • mto: (4852.3.3 2.1.0b4-doc-updates)
  • mto: This revision was merged to the branch mainline in revision 4856.
  • Revision ID: patrick.rubbs.regan@gmail.com-20091202203407-fjd0mshgn3j3foel
Removed trailing whitespace from files in doc directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2008 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1997
1997
                entry_index, present = self._find_entry_index(key, block)
1998
1998
                if present:
1999
1999
                    entry = self._dirblocks[block_index][1][entry_index]
2000
 
                    # TODO: We might want to assert that entry[0][2] ==
2001
 
                    #       fileid_utf8.
2002
2000
                    if entry[1][tree_index][0] in 'fdlt':
2003
2001
                        # this is the result we are looking for: the
2004
2002
                        # real home of this file_id in this tree.
2356
2354
        self.update_minimal(('', '', new_id), 'd',
2357
2355
            path_utf8='', packed_stat=entry[1][0][4])
2358
2356
        self._dirblock_state = DirState.IN_MEMORY_MODIFIED
 
2357
        if self._id_index is not None:
 
2358
            self._id_index.setdefault(new_id, set()).add(entry[0])
2359
2359
 
2360
2360
    def set_parent_trees(self, trees, ghosts):
2361
2361
        """Set the parent trees for the dirstate.
3013
3013
            if absent_positions == tree_count:
3014
3014
                raise AssertionError(
3015
3015
                    "entry %r has no data for any tree." % (entry,))
3016
 
        if self._id_index is not None:
3017
 
            for file_id, entry_keys in self._id_index.iteritems():
3018
 
                for entry_key in entry_keys:
3019
 
                    if entry_key[2] != file_id:
3020
 
                        raise AssertionError(
3021
 
                            'file_id %r did not match entry key %s'
3022
 
                            % (file_id, entry_key))
3023
3016
 
3024
3017
    def _wipe_state(self):
3025
3018
        """Forget all state information about the dirstate."""