Skip to content
Snippets Groups Projects
  • Jun Wu's avatar
    a31634336471
    drawdag: update test repos by drawing the changelog DAG in ASCII · a31634336471
    Jun Wu authored
    Currently, we have "debugbuilddag" which is a powerful tool to build test
    cases but not intuitive. We may end up running "hg log" in the test to make
    the test more readable.
    
    This patch adds a "drawdag" extension with a "debugdrawdag" command for
    similar testing purpose. Unlike the cryptic "debugbuilddag" command, it
    reads an ASCII graph that is intuitive to human, so the test case can be
    more readable.
    
    Unlike "debugbuilddag", "drawdag" does not require an empty repo. So it can
    be used to add new changesets to an existing repo.
    
    Since the "drawdag" logic is not that trivial and only makes sense for
    testing purpose, the extension is added to the "tests" directory, to make
    the core logic clean. If we find it useful (for example, to demonstrate
    cases and help user understand some cases) and want to ship it by default in
    the future, we can move it to a ship-by-default "debugdrawdag" at that time.
    a31634336471
    History
    drawdag: update test repos by drawing the changelog DAG in ASCII
    Jun Wu authored
    Currently, we have "debugbuilddag" which is a powerful tool to build test
    cases but not intuitive. We may end up running "hg log" in the test to make
    the test more readable.
    
    This patch adds a "drawdag" extension with a "debugdrawdag" command for
    similar testing purpose. Unlike the cryptic "debugbuilddag" command, it
    reads an ASCII graph that is intuitive to human, so the test case can be
    more readable.
    
    Unlike "debugbuilddag", "drawdag" does not require an empty repo. So it can
    be used to add new changesets to an existing repo.
    
    Since the "drawdag" logic is not that trivial and only makes sense for
    testing purpose, the extension is added to the "tests" directory, to make
    the core logic clean. If we find it useful (for example, to demonstrate
    cases and help user understand some cases) and want to ship it by default in
    the future, we can move it to a ship-by-default "debugdrawdag" at that time.