Пример #1
0
 def _checkexec(self):
     # Force checks to happen in '.hgcheck' folder so we can identify them
     d = os.path.join(self._root, '.hgcheck')
     try:
         if not os.path.isdir(d):
             os.mkdir(d)
         return util.checkexec(d)
     except (IOError, OSError):
         return False
Пример #2
0
 def _checkexec(self):
     # Force checks to happen in '.hgcheck' folder so we can identify them
     d = os.path.join(self._root, '.hgcheck')
     try:
         if not os.path.isdir(d):
             os.mkdir(d)
         return util.checkexec(d)
     except (IOError, OSError):
         return False
Пример #3
0
 def _checkexec(self):
     return util.checkexec(self._root)
Пример #4
0
 def _checkexec(self):
     return util.checkexec(self._root)
Пример #5
0
 def _chmod(self):
     return util.checkexec(self.base)
Пример #6
0
 def _chmod(self):
     return util.checkexec(self.base)
Пример #7
0
            for f in self._map:
                if self[f] != 'r':
                    self._incpath(f)
            return self._dirs
        elif name == '_ignore':
            files = [self._join('.hgignore')]
            for name, path in self._ui.configitems("ui"):
                if name == 'ignore' or name.startswith('ignore.'):
                    files.append(os.path.expanduser(path))
            self._ignore = ignore.ignore(self._root, files, self._ui.warn)
            return self._ignore
        elif name == '_slash':
            self._slash = self._ui.configbool('ui', 'slash') and os.sep != '/'
            return self._slash
        elif name == '_checkexec':
            self._checkexec = util.checkexec(self._root)
            return self._checkexec
        else:
            raise AttributeError, name

    def _join(self, f):
        return os.path.join(self._root, f)

    def getcwd(self):
        cwd = os.getcwd()
        if cwd == self._root: return ''
        # self._root ends with a path separator if self._root is '/' or 'C:\'
        rootsep = self._root
        if not util.endswithsep(rootsep):
            rootsep += os.sep
        if cwd.startswith(rootsep):
Пример #8
0
            for f in self._map:
                if self[f] != 'r':
                    self._incpath(f)
            return self._dirs
        elif name == '_ignore':
            files = [self._join('.hgignore')]
            for name, path in self._ui.configitems("ui"):
                if name == 'ignore' or name.startswith('ignore.'):
                    files.append(os.path.expanduser(path))
            self._ignore = ignore.ignore(self._root, files, self._ui.warn)
            return self._ignore
        elif name == '_slash':
            self._slash = self._ui.configbool('ui', 'slash') and os.sep != '/'
            return self._slash
        elif name == '_checkexec':
            self._checkexec = util.checkexec(self._root)
            return self._checkexec
        else:
            raise AttributeError, name

    def _join(self, f):
        return os.path.join(self._root, f)

    def getcwd(self):
        cwd = os.getcwd()
        if cwd == self._root: return ''
        # self._root ends with a path separator if self._root is '/' or 'C:\'
        rootsep = self._root
        if not util.endswithsep(rootsep):
            rootsep += os.sep
        if cwd.startswith(rootsep):