# Path: punch/vcs_repositories/git_repo.py
# class GitRepo(vr.VCSRepo):
#     def __init__(self, working_path, config_obj, files_to_commit=None):
#     def _check_config(self):
#     def _check_system(self):
#     def _set_command(self):
#     def get_current_branch(self):
#     def get_tags(self):
#     def get_branches(self):
#     def pre_start_release(self):
#     def start_release(self):
#     def finish_release(self):
#     def post_finish_release(self):
#     def tag(self, tag_name):
#     def get_info(self):
# 
# Path: punch/vcs_repositories/exceptions.py
# class RepositoryStatusError(RepositoryError):
#     pass
# 
# class RepositorySystemError(RepositoryError):
#     pass


import subprocess
import os
import six
from punch.vcs_repositories import git_repo as gr
from punch.vcs_repositories.exceptions import (
    RepositoryStatusError,
    RepositorySystemError
)

        p = subprocess.Popen(
            self.commands,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE
        )

        stdout, stderr = p.communicate()

        if "git flow <subcommand>" not in stdout.decode('utf8'):
            raise RepositorySystemError("Cannot run {}".format(self.commands))

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

    def pre_start_release(self):
        output = self._run([self.command, "status"])
        if "Changes to be committed:" in output:
            raise RepositoryStatusError(
                ("Cannot start release while repository "
                 "contains uncommitted changes")
            )

        self._run([self.command, "checkout", "develop"])

        branch = self.get_current_branch()

        if branch != "develop":

# Path: punch/vcs_repositories/git_repo.py
# class GitRepo(vr.VCSRepo):
#     def __init__(self, working_path, config_obj, files_to_commit=None):
#     def _check_config(self):
#     def _check_system(self):
#     def _set_command(self):
#     def get_current_branch(self):
#     def get_tags(self):
#     def get_branches(self):
#     def pre_start_release(self):
#     def start_release(self):
#     def finish_release(self):
#     def post_finish_release(self):
#     def tag(self, tag_name):
#     def get_info(self):
# 
# Path: punch/vcs_repositories/exceptions.py
# class RepositoryStatusError(RepositoryError):
#     pass
# 
# class RepositorySystemError(RepositoryError):
#     pass


# Path: punch/vcs_repositories/git_flow_repo.py
import subprocess
import os
import six
from punch.vcs_repositories import git_repo as gr
from punch.vcs_repositories.exceptions import (
    RepositoryStatusError,
    RepositorySystemError
)


        p = subprocess.Popen(
            self.commands,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE
        )

        stdout, stderr = p.communicate()

        if "git flow <subcommand>" not in stdout.decode('utf8'):
            raise RepositorySystemError("Cannot run {}".format(self.commands))

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

    def pre_start_release(self):
        output = self._run([self.command, "status"])
        if "Changes to be committed:" in output:
            raise RepositoryStatusError(
                ("Cannot start release while repository "
                 "contains uncommitted changes")
            )

        self._run([self.command, "checkout", "develop"])

        branch = self.get_current_branch()

        if branch != "develop":

            raise RepositoryStatusError(