2020-10-20 03:05:23 +03:00
|
|
|
# coding=utf-8
|
|
|
|
|
|
|
|
# coding=utf-8
|
|
|
|
|
2019-08-10 02:12:58 +03:00
|
|
|
# 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"
|
2021-05-05 08:13:57 +03:00
|
|
|
(
|
|
|
|
sh % "hg debugdrawdag"
|
|
|
|
<< r"""
|
2019-08-10 02:12:58 +03:00
|
|
|
J K
|
|
|
|
|/|
|
|
|
|
H I
|
|
|
|
| |
|
|
|
|
F G
|
|
|
|
|/
|
|
|
|
E
|
|
|
|
|\
|
|
|
|
A D
|
|
|
|
|\|
|
|
|
|
B C
|
|
|
|
"""
|
2021-05-05 08:13:57 +03:00
|
|
|
)
|
2019-08-10 02:12:58 +03:00
|
|
|
|
|
|
|
sh % "hg debugbindag -r '::A' -o a.dag"
|
|
|
|
sh % "hg debugpreviewbindag a.dag" == r"""
|
|
|
|
o 2
|
2020-10-20 03:05:23 +03:00
|
|
|
├─╮
|
|
|
|
o │ 1
|
|
|
|
│
|
|
|
|
o 0"""
|
2019-08-10 02:12:58 +03:00
|
|
|
|
|
|
|
|
|
|
|
sh % "hg debugbindag -r '::J' -o j.dag"
|
|
|
|
sh % "hg debugpreviewbindag j.dag" == r"""
|
|
|
|
o 7
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-08-10 02:12:58 +03:00
|
|
|
o 6
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-08-10 02:12:58 +03:00
|
|
|
o 5
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-08-10 02:12:58 +03:00
|
|
|
o 4
|
2020-10-20 03:05:23 +03:00
|
|
|
├─╮
|
|
|
|
│ o 3
|
|
|
|
│ │
|
|
|
|
o │ 2
|
|
|
|
├─╮
|
|
|
|
│ o 1
|
|
|
|
│
|
2019-08-10 02:12:58 +03:00
|
|
|
o 0"""
|
|
|
|
|
|
|
|
sh % "hg debugbindag -r 'all()' -o all.dag"
|
|
|
|
sh % "hg debugpreviewbindag all.dag" == r"""
|
|
|
|
o 10
|
2020-10-20 03:05:23 +03:00
|
|
|
├─╮
|
|
|
|
│ │ o 9
|
|
|
|
│ ├─╯
|
|
|
|
o │ 8
|
|
|
|
│ │
|
|
|
|
│ o 7
|
|
|
|
│ │
|
|
|
|
o │ 6
|
|
|
|
│ │
|
|
|
|
│ o 5
|
|
|
|
├─╯
|
2019-08-10 02:12:58 +03:00
|
|
|
o 4
|
2020-10-20 03:05:23 +03:00
|
|
|
├─╮
|
|
|
|
│ o 3
|
|
|
|
│ │
|
|
|
|
o │ 2
|
|
|
|
├─╮
|
|
|
|
│ o 1
|
|
|
|
│
|
2019-08-10 02:12:58 +03:00
|
|
|
o 0"""
|