mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
9bf6b674a6
Summary: Change the legacy Python graph render to Rust renderer. Reviewed By: DurhamG Differential Revision: D24317802 fbshipit-source-id: 4c3dc3a6dd02b7ebe79596a8e77f4b6b139d2e20
80 lines
1.1 KiB
Python
80 lines
1.1 KiB
Python
# coding=utf-8
|
|
|
|
# coding=utf-8
|
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
from __future__ import absolute_import
|
|
|
|
from testutil.dott import feature, sh, testtmp # noqa: F401
|
|
|
|
|
|
sh % "newrepo"
|
|
sh % "hg debugdrawdag" << r"""
|
|
J K
|
|
|/|
|
|
H I
|
|
| |
|
|
F G
|
|
|/
|
|
E
|
|
|\
|
|
A D
|
|
|\|
|
|
B C
|
|
"""
|
|
|
|
sh % "hg debugbindag -r '::A' -o a.dag"
|
|
sh % "hg debugpreviewbindag a.dag" == r"""
|
|
o 2
|
|
├─╮
|
|
o │ 1
|
|
│
|
|
o 0"""
|
|
|
|
|
|
sh % "hg debugbindag -r '::J' -o j.dag"
|
|
sh % "hg debugpreviewbindag j.dag" == r"""
|
|
o 7
|
|
│
|
|
o 6
|
|
│
|
|
o 5
|
|
│
|
|
o 4
|
|
├─╮
|
|
│ o 3
|
|
│ │
|
|
o │ 2
|
|
├─╮
|
|
│ o 1
|
|
│
|
|
o 0"""
|
|
|
|
sh % "hg debugbindag -r 'all()' -o all.dag"
|
|
sh % "hg debugpreviewbindag all.dag" == r"""
|
|
o 10
|
|
├─╮
|
|
│ │ o 9
|
|
│ ├─╯
|
|
o │ 8
|
|
│ │
|
|
│ o 7
|
|
│ │
|
|
o │ 6
|
|
│ │
|
|
│ o 5
|
|
├─╯
|
|
o 4
|
|
├─╮
|
|
│ o 3
|
|
│ │
|
|
o │ 2
|
|
├─╮
|
|
│ o 1
|
|
│
|
|
o 0"""
|