def is_ancestor(self, commit1, commit2, patch=False):
result = self.hg("<STR_LIT>", "<STR_LIT>", "<STR_LIT>" % (commit1, commit2),<EOL>"<STR_LIT>", "<STR_LIT>", patch=patch)<EOL>return "<STR_LIT>" in result<EOL>
Returns True if commit1 is a direct ancestor of commit2, or False
        otherwise.

        This method considers a commit to be a direct ancestor of itself