~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

WorkingTree4.add must not require a file to exist to add it when kind etc is given.

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
            assert '..' not in f
171
171
            if file_id is None:
172
172
                file_id = generate_ids.gen_file_id(f)
173
 
            stat = os.lstat(self.abspath(f))
174
 
            sha1 = '1' * 20 # FIXME: DIRSTATE MERGE BLOCKER
175
 
            state.add(f, file_id, kind, stat, sha1)
 
173
            # deliberately add the file with no cached stat or sha1
 
174
            # - on the first access it will be gathered, and we can
 
175
            # always change this once tests are all passing.
 
176
            state.add(f, file_id, kind, None, '')
176
177
        self._dirty = True
177
178
 
178
179
    def current_dirstate(self):