Exemple #1
0
    def _check_system(self):
        if six.PY2:
            super(HgRepo, self)._check_system()
        else:
            super()._check_system()

        if not os.path.exists(os.path.join(self.working_path, '.hg')):
            raise e.RepositorySystemError(
                "The current directory {} is not a Hg repository".format(
                    self.working_path))
Exemple #2
0
    def _check_system(self):
        if six.PY2:
            super(GitRepo, self)._check_system()
        else:
            super()._check_system()

        if not os.path.exists(os.path.join(self.working_path, '.git')):
            raise e.RepositorySystemError(
                ("The current directory {} "
                 "is not a Git repository").format(self.working_path))