Exemplo n.º 1
0
 def _addpath(self, f, check=False):
     oldstate = self[f]
     if check or oldstate == "r":
         scmutil.checkfilename(f)
         if f in self._dirs:
             raise util.Abort(_('directory %r already in dirstate') % f)
         # shadows
         for d in _finddirs(f):
             if d in self._dirs:
                 break
             if d in self._map and self[d] != 'r':
                 raise util.Abort(
                     _('file %r in dirstate clashes with %r') % (d, f))
     if oldstate in "?r" and "_dirs" in self.__dict__:
         _incdirs(self._dirs, f)
Exemplo n.º 2
0
 def _addpath(self, f, check=False):
     oldstate = self[f]
     if check or oldstate == "r":
         scmutil.checkfilename(f)
         if f in self._dirs:
             raise util.Abort(_('directory %r already in dirstate') % f)
         # shadows
         for d in _finddirs(f):
             if d in self._dirs:
                 break
             if d in self._map and self[d] != 'r':
                 raise util.Abort(
                     _('file %r in dirstate clashes with %r') % (d, f))
     if oldstate in "?r" and "_dirs" in self.__dict__:
         _incdirs(self._dirs, f)
Exemplo n.º 3
0
 def _addpath(self, f, state, mode, size, mtime):
     oldstate = self[f]
     if state == 'a' or oldstate == 'r':
         scmutil.checkfilename(f)
         if f in self._dirs:
             raise util.Abort(_('directory %r already in dirstate') % f)
         # shadows
         for d in scmutil.finddirs(f):
             if d in self._dirs:
                 break
             if d in self._map and self[d] != 'r':
                 raise util.Abort(
                     _('file %r in dirstate clashes with %r') % (d, f))
     if oldstate in "?r" and "_dirs" in self.__dict__:
         self._dirs.addpath(f)
     self._dirty = True
     self._map[f] = dirstatetuple(state, mode, size, mtime)
Exemplo n.º 4
0
 def _addpath(self, f, state, mode, size, mtime):
     oldstate = self[f]
     if state == 'a' or oldstate == 'r':
         scmutil.checkfilename(f)
         if f in self._dirs:
             raise util.Abort(_('directory %r already in dirstate') % f)
         # shadows
         for d in scmutil.finddirs(f):
             if d in self._dirs:
                 break
             if d in self._map and self[d] != 'r':
                 raise util.Abort(
                     _('file %r in dirstate clashes with %r') % (d, f))
     if oldstate in "?r" and "_dirs" in self.__dict__:
         self._dirs.addpath(f)
     self._dirty = True
     self._map[f] = dirstatetuple(state, mode, size, mtime)