equal
deleted
inserted
replaced
137 raise |
137 raise |
138 return [nullid, nullid] |
138 return [nullid, nullid] |
139 |
139 |
140 @propertycache |
140 @propertycache |
141 def _dirs(self): |
141 def _dirs(self): |
142 return scmutil.dirs(self._map, 'r') |
142 return util.dirs(self._map, 'r') |
143 |
143 |
144 def dirs(self): |
144 def dirs(self): |
145 return self._dirs |
145 return self._dirs |
146 |
146 |
147 @rootcache('.hgignore') |
147 @rootcache('.hgignore') |
379 if state == 'a' or oldstate == 'r': |
379 if state == 'a' or oldstate == 'r': |
380 scmutil.checkfilename(f) |
380 scmutil.checkfilename(f) |
381 if f in self._dirs: |
381 if f in self._dirs: |
382 raise util.Abort(_('directory %r already in dirstate') % f) |
382 raise util.Abort(_('directory %r already in dirstate') % f) |
383 # shadows |
383 # shadows |
384 for d in scmutil.finddirs(f): |
384 for d in util.finddirs(f): |
385 if d in self._dirs: |
385 if d in self._dirs: |
386 break |
386 break |
387 if d in self._map and self[d] != 'r': |
387 if d in self._map and self[d] != 'r': |
388 raise util.Abort( |
388 raise util.Abort( |
389 _('file %r in dirstate clashes with %r') % (d, f)) |
389 _('file %r in dirstate clashes with %r') % (d, f)) |
599 def _dirignore(self, f): |
599 def _dirignore(self, f): |
600 if f == '.': |
600 if f == '.': |
601 return False |
601 return False |
602 if self._ignore(f): |
602 if self._ignore(f): |
603 return True |
603 return True |
604 for p in scmutil.finddirs(f): |
604 for p in util.finddirs(f): |
605 if self._ignore(p): |
605 if self._ignore(p): |
606 return True |
606 return True |
607 return False |
607 return False |
608 |
608 |
609 def _walkexplicit(self, match, subrepos): |
609 def _walkexplicit(self, match, subrepos): |
696 except OSError, inst: # nf not found on disk - it is dirstate only |
696 except OSError, inst: # nf not found on disk - it is dirstate only |
697 if nf in dmap: # does it exactly match a missing file? |
697 if nf in dmap: # does it exactly match a missing file? |
698 results[nf] = None |
698 results[nf] = None |
699 else: # does it match a missing directory? |
699 else: # does it match a missing directory? |
700 if alldirs is None: |
700 if alldirs is None: |
701 alldirs = scmutil.dirs(dmap) |
701 alldirs = util.dirs(dmap) |
702 if nf in alldirs: |
702 if nf in alldirs: |
703 if matchedir: |
703 if matchedir: |
704 matchedir(nf) |
704 matchedir(nf) |
705 notfoundadd(nf) |
705 notfoundadd(nf) |
706 else: |
706 else: |