Commit Graph

4 Commits

Author SHA1 Message Date
Jun Wu
086ed52ada drawdag: provide filenode for its dummy filectx
basefctx has filenode, which will be used in a future fast path of skipping
flag processor during repo._filecommit.

This patch adds filenode to drawdag's faked filectx so we don't need to use
hasattr in localrepo.py.
2017-05-17 10:48:56 -07:00
Martin von Zweigbergk
c3406ac3db cleanup: use set literals
We no longer support Python 2.6, so we can now use set literals.
2017-02-10 16:56:29 -08:00
Pierre-Yves David
bbb0efe6b0 drawdag: use 'tagsmod.tag' instead of 'repo.tag'
The former is about to be deprecated.
2017-03-27 18:08:05 +02:00
Jun Wu
8592a26676 drawdag: update test repos by drawing the changelog DAG in ASCII
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.
2016-11-09 16:01:34 +00:00