~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

  • Committer: John Arbash Meinel
  • Date: 2011-04-22 14:12:22 UTC
  • mfrom: (5809 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5836.
  • Revision ID: john@arbash-meinel.com-20110422141222-nx2j0hbkihcb8j16
Merge newer bzr.dev and resolve conflicts.
Try to write some documentation about how the _dirblock_state works.
Fix up the tests so that they pass again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3277
3277
    # If we have gotten this far, that means that we need to actually
3278
3278
    # process this entry.
3279
3279
    link_or_sha1 = None
 
3280
    worth_saving = True
3280
3281
    if minikind == 'f':
3281
3282
        executable = state._is_executable(stat_value.st_mode,
3282
3283
                                         saved_executable)
3298
3299
        else:
3299
3300
            entry[1][0] = ('f', '', stat_value.st_size,
3300
3301
                           executable, DirState.NULLSTAT)
 
3302
            worth_saving = False
3301
3303
    elif minikind == 'd':
3302
3304
        link_or_sha1 = None
3303
3305
        entry[1][0] = ('d', '', 0, False, packed_stat)
3309
3311
                state._get_block_entry_index(entry[0][0], entry[0][1], 0)
3310
3312
            state._ensure_block(block_index, entry_index,
3311
3313
                               osutils.pathjoin(entry[0][0], entry[0][1]))
 
3314
        else:
 
3315
            worth_saving = False
3312
3316
    elif minikind == 'l':
 
3317
        if saved_minikind == 'l':
 
3318
            worth_saving = False
3313
3319
        link_or_sha1 = state._read_link(abspath, saved_link_or_sha1)
3314
3320
        if state._cutoff_time is None:
3315
3321
            state._sha_cutoff_time()
3320
3326
        else:
3321
3327
            entry[1][0] = ('l', '', stat_value.st_size,
3322
3328
                           False, DirState.NULLSTAT)
3323
 
    state._mark_modified([entry])
 
3329
    if worth_saving:
 
3330
        state._mark_modified([entry])
3324
3331
    return link_or_sha1
3325
3332
 
3326
3333