~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-19 10:42:59 UTC
  • mto: This revision was merged to the branch mainline in revision 5806.
  • Revision ID: jelmer@samba.org-20110419104259-g9exlcp1f5jdu3ci
Move Inventory._get_mutable_inventory -> mutable_inventory_from_tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2474
2474
            # the suffix is from tree_index+1:parent_count+1.
2475
2475
            new_location_suffix = [DirState.NULL_PARENT_DETAILS] * (parent_count - tree_index)
2476
2476
            # now stitch in all the entries from this tree
2477
 
            for path, entry in tree.iter_entries_by_dir():
 
2477
            for path, entry in tree.inventory.iter_entries_by_dir():
2478
2478
                # here we process each trees details for each item in the tree.
2479
2479
                # we first update any existing entries for the id at other paths,
2480
2480
                # then we either create or update the entry for the id at the
3205
3205
    # If we have gotten this far, that means that we need to actually
3206
3206
    # process this entry.
3207
3207
    link_or_sha1 = None
3208
 
    worth_saving = True
3209
3208
    if minikind == 'f':
3210
3209
        executable = state._is_executable(stat_value.st_mode,
3211
3210
                                         saved_executable)
3227
3226
        else:
3228
3227
            entry[1][0] = ('f', '', stat_value.st_size,
3229
3228
                           executable, DirState.NULLSTAT)
3230
 
            worth_saving = False
3231
3229
    elif minikind == 'd':
3232
3230
        link_or_sha1 = None
3233
3231
        entry[1][0] = ('d', '', 0, False, packed_stat)
3239
3237
                state._get_block_entry_index(entry[0][0], entry[0][1], 0)
3240
3238
            state._ensure_block(block_index, entry_index,
3241
3239
                               osutils.pathjoin(entry[0][0], entry[0][1]))
3242
 
        else:
3243
 
            worth_saving = False
3244
3240
    elif minikind == 'l':
3245
3241
        link_or_sha1 = state._read_link(abspath, saved_link_or_sha1)
3246
3242
        if state._cutoff_time is None:
3252
3248
        else:
3253
3249
            entry[1][0] = ('l', '', stat_value.st_size,
3254
3250
                           False, DirState.NULLSTAT)
3255
 
    if worth_saving:
3256
 
        state._dirblock_state = DirState.IN_MEMORY_MODIFIED
 
3251
    state._dirblock_state = DirState.IN_MEMORY_MODIFIED
3257
3252
    return link_or_sha1
3258
3253
 
3259
3254