~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

(broken) merge dirstate branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
            f = f.strip('/')
169
169
            assert '//' not in f
170
170
            assert '..' not in f
 
171
            if self.path2id(f):
 
172
                # special case tree root handling.
 
173
                if f == '' and self.path2id(f) == ROOT_ID:
 
174
                    state.set_path_id('', generate_ids.gen_file_id(f))
 
175
                continue
171
176
            if file_id is None:
172
177
                file_id = generate_ids.gen_file_id(f)
173
178
            # deliberately add the file with no cached stat or sha1
239
244
            kind = 'tree-reference'
240
245
        return kind, executable, stat_value
241
246
 
 
247
    @needs_write_lock
 
248
    def commit(self, message=None, revprops=None, *args, **kwargs):
 
249
        # mark the tree as dirty post commit - commit
 
250
        # can change the current versioned list by doing deletes.
 
251
        result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
 
252
        self._make_dirty(reset_inventory=True)
 
253
        return result
 
254
 
242
255
    def current_dirstate(self):
243
256
        """Return the current dirstate object. 
244
257
 
506
519
            state._get_block_entry_index(to_entry_dirname, to_basename, 0)
507
520
        if not entry_present:
508
521
            raise errors.BzrMoveFailedError('', to_dir,
509
 
                errors.NotInWorkingDirectory(to_dir))
 
522
                errors.NotVersionedError(to_dir))
510
523
        to_entry = state._dirblocks[to_entry_block_index][1][to_entry_entry_index]
511
524
        # get a handle on the block itself.
512
525
        to_block_index = state._ensure_block(