touch: use repo.setparents() instead of repo.dirstate.setparents()
setparents() was added to localrepository class in 2012, and now we finally
have some differences between calling repo.setparents() vs
repo.dirstate.setparents(): _quick_access_* things, introduced in hg 5.3.
This patch fixes potential quick-access desync problems where repo[b'.'] would
be different from repo.dirstate.p1().
import hghave
@hghave.check("docgraph-ext", "Extension to generate graph from repository")
def docgraph():
try:
import hgext.docgraph
hgext.docgraph.cmdtable # trigger import
except ImportError:
try:
import hgext3rd.docgraph
hgext3rd.docgraph.cmdtable # trigger import
except ImportError:
return False
return True