<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_repo_type(self):
 """Check for git or hg repository"""

        is_git = self.call(['git', 'rev-parse', '--is-inside-work-tree'],
                           devnull=True)
        if is_git != 0:
            if self.debug:
                click.echo('not git')
            is_hg = self.call(['hg', '-q', 'stat'], devnull=True)
            if is_hg != 0:
                if self.debug:
                    click.echo('not hg')
                exit(1)
            else:
                self.vc_name = 'hg'