tests/test-drawdag.t
author Jun Wu <quark@fb.com>
Mon, 26 Jun 2017 23:31:53 -0700
changeset 33158 367a3c6473d2
child 33159 4d780d510b44
permissions -rw-r--r--
test-drawdag: add a test for drawdag.py The drawdag script is useful but does not have a formal test. This patch adds it.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33158
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH<<EOF
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     2
  > [extensions]
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
  > drawdag=$TESTDIR/drawdag.py
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
  > EOF
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     5
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
  $ reinit () {
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
  >   rm -rf .hg && hg init
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
  > }
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    10
  $ hg init
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
Test what said in drawdag.py docstring
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    13
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    14
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    15
  > c d
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    16
  > |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    17
  > b
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    18
  > |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    19
  > a
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    20
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    21
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    22
  $ hg log -G -T '{rev} {desc} ({tags})'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    23
  o  3 d (d tip)
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    24
  |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    25
  | o  2 c (c)
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    26
  |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    27
  o  1 b (b)
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    28
  |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    29
  o  0 a (a)
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    30
  
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    31
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    32
  >  foo    bar       bar  foo
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    33
  >   |     /          |    |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    34
  >  ancestor(c,d)     a   baz
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    35
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    36
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    37
  $ hg log -G -T '{desc}'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    38
  o    foo
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    39
  |\
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    40
  +---o  bar
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    41
  | | |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    42
  | o |  baz
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    43
  |  /
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    44
  +---o  d
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    45
  | |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    46
  +---o  c
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    47
  | |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    48
  o |  b
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    49
  |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    50
  o  a
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    51
  
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    52
  $ reinit
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    53
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    54
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    55
  > o    foo
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    56
  > |\
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    57
  > +---o  bar
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    58
  > | | |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    59
  > | o |  baz
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    60
  > |  /
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    61
  > +---o  d
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    62
  > | |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    63
  > +---o  c
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    64
  > | |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    65
  > o |  b
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    66
  > |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    67
  > o  a
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    68
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    69
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    70
  $ hg log -G -T '{desc}'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    71
  o    foo
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    72
  |\
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    73
  | | o  d
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    74
  | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    75
  | | o  c
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    76
  | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    77
  | | o  bar
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    78
  | |/|
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    79
  | o |  b
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    80
  | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    81
  o /  baz
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    82
   /
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    83
  o  a
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    84
  
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    85
  $ reinit
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    86
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    87
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    88
  > o    foo
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    89
  > |\
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    90
  > | | o  d
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    91
  > | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    92
  > | | o  c
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    93
  > | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    94
  > | | o  bar
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    95
  > | |/|
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    96
  > | o |  b
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    97
  > | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    98
  > o /  baz
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
    99
  >  /
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   100
  > o  a
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   101
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   102
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   103
  $ hg log -G -T '{desc}'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   104
  o    foo
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   105
  |\
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   106
  | | o  d
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   107
  | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   108
  | | o  c
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   109
  | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   110
  | | o  bar
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   111
  | |/|
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   112
  | o |  b
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   113
  | |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   114
  o /  baz
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   115
   /
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   116
  o  a
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   117
  
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   118
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   119
Edges existed in repo are no-ops
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   120
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   121
  $ reinit
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   122
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   123
  > B C C
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   124
  > | | |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   125
  > A A B
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   126
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   127
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   128
  $ hg log -G -T '{desc}'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   129
  o    C
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   130
  |\
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   131
  | o  B
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   132
  |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   133
  o  A
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   134
  
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   135
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   136
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   137
  > C D C
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   138
  > | | |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   139
  > B B A
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   140
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   141
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   142
  $ hg log -G -T '{desc}'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   143
  o  D
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   144
  |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   145
  | o  C
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   146
  |/|
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   147
  o |  B
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   148
  |/
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   149
  o  A
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   150
  
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   151
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   152
Node with more than 2 parents are disallowed
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   153
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   154
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   155
  >   A
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   156
  >  /|\
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   157
  > D B C
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   158
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   159
  abort: A: too many parents: C D B
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   160
  [255]
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   161
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   162
Cycles are disallowed
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   163
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   164
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   165
  > A
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   166
  > |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   167
  > A
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   168
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   169
  abort: the graph has cycles
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   170
  [255]
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   171
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   172
  $ hg debugdrawdag <<'EOS'
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   173
  > A
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   174
  > |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   175
  > B
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   176
  > |
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   177
  > A
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   178
  > EOS
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   179
  abort: the graph has cycles
367a3c6473d2 test-drawdag: add a test for drawdag.py
Jun Wu <quark@fb.com>
parents:
diff changeset
   180
  [255]