/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Robert Collins
  • Date: 2007-03-01 11:16:53 UTC
  • mto: (2255.11.3 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070301111653-xz97hibpktk2y5co
Test adding of roots to trees, it was broken on WorkingTree4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
            f = f.strip('/')
173
173
            assert '//' not in f
174
174
            assert '..' not in f
 
175
            if self.path2id(f):
 
176
                # special case tree root handling.
 
177
                if f == '' and self.path2id(f) == ROOT_ID:
 
178
                    state.set_path_id('', generate_ids.gen_file_id(f))
 
179
                continue
175
180
            if file_id is None:
176
181
                file_id = generate_ids.gen_file_id(f)
177
182
            # deliberately add the file with no cached stat or sha1
227
232
        self._control_files.break_lock()
228
233
        self.branch.break_lock()
229
234
 
 
235
    @needs_write_lock
 
236
    def commit(self, message=None, revprops=None, *args, **kwargs):
 
237
        # mark the tree as dirty post commit - commit
 
238
        # can change the current versioned list by doing deletes.
 
239
        result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
 
240
        self._make_dirty(reset_inventory=True)
 
241
        return result
 
242
 
230
243
    def current_dirstate(self):
231
244
        """Return the current dirstate object. 
232
245