debugbuilddag: build a changelog dag from a concise description
Useful in tests to quickly build a complex DAG in an empty repo.
Handles local tags and named branches.
Options to, at each rev,
- create a new file,
- overwrite the same file,
- append to the same file,
- write to a specific line in a mergeable file.
Can run shell commands during DAG buildup.
# this is hack to make sure no escape characters are inserted into the output
import os
if 'TERM' in os.environ:
del os.environ['TERM']
import doctest
import mercurial.changelog
# test doctest from changelog
doctest.testmod(mercurial.changelog)
import mercurial.httprepo
doctest.testmod(mercurial.httprepo)
import mercurial.util
doctest.testmod(mercurial.util)
import mercurial.dagparser
doctest.testmod(mercurial.dagparser, optionflags=doctest.NORMALIZE_WHITESPACE)
import hgext.convert.cvsps
doctest.testmod(hgext.convert.cvsps)