200 raise util.Abort(_('file %r in dirstate clashes with %r') % |
200 raise util.Abort(_('file %r in dirstate clashes with %r') % |
201 (d, f)) |
201 (d, f)) |
202 self._incpath(f) |
202 self._incpath(f) |
203 |
203 |
204 def normal(self, f): |
204 def normal(self, f): |
205 'mark a file normal' |
205 'mark a file normal and clean' |
206 self._dirty = True |
206 self._dirty = True |
207 s = os.lstat(self._join(f)) |
207 s = os.lstat(self._join(f)) |
208 self._map[f] = ('n', s.st_mode, s.st_size, s.st_mtime) |
208 self._map[f] = ('n', s.st_mode, s.st_size, s.st_mtime) |
209 if self._copymap.has_key(f): |
209 if self._copymap.has_key(f): |
210 del self._copymap[f] |
210 del self._copymap[f] |
211 |
211 |
|
212 def normallookup(self, f): |
|
213 'mark a file normal, but possibly dirty' |
|
214 self._dirty = True |
|
215 self._map[f] = ('n', 0, -1, -1) |
|
216 if f in self._copymap: |
|
217 del self._copymap[f] |
|
218 |
212 def normaldirty(self, f): |
219 def normaldirty(self, f): |
213 'mark a file normal, but possibly dirty' |
220 'mark a file normal, but dirty' |
214 self._dirty = True |
221 self._dirty = True |
215 s = os.lstat(self._join(f)) |
222 self._map[f] = ('n', 0, -2, -1) |
216 self._map[f] = ('n', s.st_mode, -1, -1) |
|
217 if f in self._copymap: |
223 if f in self._copymap: |
218 del self._copymap[f] |
224 del self._copymap[f] |
219 |
225 |
220 def add(self, f): |
226 def add(self, f): |
221 'mark a file added' |
227 'mark a file added' |
521 if type_ == 'n': |
527 if type_ == 'n': |
522 if not st: |
528 if not st: |
523 st = lstat(_join(fn)) |
529 st = lstat(_join(fn)) |
524 if (size >= 0 and (size != st.st_size |
530 if (size >= 0 and (size != st.st_size |
525 or (mode ^ st.st_mode) & 0100) |
531 or (mode ^ st.st_mode) & 0100) |
|
532 or size == -2 |
526 or fn in self._copymap): |
533 or fn in self._copymap): |
527 madd(fn) |
534 madd(fn) |
528 elif time != int(st.st_mtime): |
535 elif time != int(st.st_mtime): |
529 ladd(fn) |
536 ladd(fn) |
530 elif list_clean: |
537 elif list_clean: |