~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-24 18:26:21 UTC
  • mfrom: (4567 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4568.
  • Revision ID: john@arbash-meinel.com-20090724182621-68s2jhoqf3pn72n7
Merge bzr.dev 4567 to resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
435
435
        return osutils.lexists(pathjoin(
436
436
                    self.basedir, row[0].decode('utf8'), row[1].decode('utf8')))
437
437
 
 
438
    def has_or_had_id(self, file_id):
 
439
        state = self.current_dirstate()
 
440
        row, parents = self._get_entry(file_id=file_id)
 
441
        return row is not None
 
442
 
438
443
    @needs_read_lock
439
444
    def id2path(self, file_id):
440
445
        "Convert a file-id to a path."
1195
1200
                # just forget the whole block.
1196
1201
                entry_index = 0
1197
1202
                while entry_index < len(block[1]):
1198
 
                    # Mark this file id as having been removed
1199
1203
                    entry = block[1][entry_index]
1200
 
                    ids_to_unversion.discard(entry[0][2])
1201
 
                    if (entry[1][0][0] in 'ar' # don't remove absent or renamed
1202
 
                                               # entries
1203
 
                        or not state._make_absent(entry)):
 
1204
                    if entry[1][0][0] in 'ar':
 
1205
                        # don't remove absent or renamed entries
1204
1206
                        entry_index += 1
 
1207
                    else:
 
1208
                        # Mark this file id as having been removed
 
1209
                        ids_to_unversion.discard(entry[0][2])
 
1210
                        if not state._make_absent(entry):
 
1211
                            # The block has not shrunk.
 
1212
                            entry_index += 1
1205
1213
                # go to the next block. (At the moment we dont delete empty
1206
1214
                # dirblocks)
1207
1215
                block_index += 1