'Return status of repository or file.
Without file argument: returns status of the repository:
:\'D?\': dirty (tracked modified files: added, removed, deleted, modified),
:\'?U\': untracked-dirty (added, but not tracked files)
:None: clean (status is empty)
With file argument: returns status of this file: `M`odified, `A`dded,
`R`emoved, `D`eleted (removed from filesystem, but still tracked),
`U`nknown, `I`gnored, (None)Clean.'

def status(self, path=None):

    if path:
        return get_file_status(directory=self.directory, dirstate_file=join(self.directory, u'.hg', u'dirstate'), file_path=path, ignore_file_name=u'.hgignore', get_func=self.do_status, create_watcher=self.create_watcher)
    return self.do_status(self.directory, path)
