tests/test-debugcommands.t
author Boris Feld <boris.feld@octobus.net>
Mon, 12 Nov 2018 01:04:04 +0100
changeset 40909 e646fda7be2e
parent 40365 4f37af86d5d5
child 40937 a0886a4d6dce
permissions -rw-r--r--
test: enable sparse-revlog for test-debugcommands.t We are about to enable sparse-revlog globally. To help with reviewing the tests change, we isolate them in individual changesets. Differential Revision: https://phab.mercurial-scm.org/D5318
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
     1
TRANSITIONAL CONFIG
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
     2
  $ cat << EOF >> $HGRCPATH
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
     3
  > [format]
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
     4
  > sparse-revlog = yes
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
     5
  > EOF
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
     6
26918
0438df737fb7 test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24503
diff changeset
     7
  $ cat << EOF >> $HGRCPATH
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
     8
  > [ui]
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
     9
  > interactive=yes
26918
0438df737fb7 test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24503
diff changeset
    10
  > EOF
0438df737fb7 test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24503
diff changeset
    11
17188
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    12
  $ hg init debugrevlog
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    13
  $ cd debugrevlog
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    14
  $ echo a > a
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    15
  $ hg ci -Am adda
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    16
  adding a
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    17
  $ hg rm .
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    18
  removing a
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    19
  $ hg ci -Am make-it-empty
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    20
  $ hg revert --all -r 0
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    21
  adding a
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    22
  $ hg ci -Am make-it-full
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37413
diff changeset
    23
#if reporevlogstore
39181
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    24
  $ hg debugrevlog -c
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    25
  format : 1
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    26
  flags  : inline
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    27
  
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    28
  revisions     :   3
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    29
      merges    :   0 ( 0.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    30
      normal    :   3 (100.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    31
  revisions     :   3
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    32
      empty     :   0 ( 0.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    33
                     text  :   0 (100.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    34
                     delta :   0 (100.00%)
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    35
      snapshot  :   3 (100.00%)
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    36
        lvl-0   :         3 (100.00%)
39181
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    37
      deltas    :   0 ( 0.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    38
  revision size : 191
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    39
      snapshot  : 191 (100.00%)
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    40
        lvl-0   :       191 (100.00%)
39181
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    41
      deltas    :   0 ( 0.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    42
  
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    43
  chunks        :   3
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    44
      0x75 (u)  :   3 (100.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    45
  chunks size   : 191
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    46
      0x75 (u)  : 191 (100.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    47
  
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    48
  avg chain length  :  0
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    49
  max chain length  :  0
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    50
  max chain reach   : 67
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    51
  compression ratio :  0
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    52
  
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    53
  uncompressed data size (min/max/avg) : 57 / 66 / 62
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    54
  full revision size (min/max/avg)     : 58 / 67 / 63
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    55
  inter-snapshot size (min/max/avg)    : 0 / 0 / 0
39181
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    56
  delta size (min/max/avg)             : 0 / 0 / 0
17188
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    57
  $ hg debugrevlog -m
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    58
  format : 1
26918
0438df737fb7 test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24503
diff changeset
    59
  flags  : inline, generaldelta
17188
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    60
  
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    61
  revisions     :  3
17188
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    62
      merges    :  0 ( 0.00%)
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    63
      normal    :  3 (100.00%)
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    64
  revisions     :  3
39118
195ed920653e debugrevlog: track empty revlog entries
Boris Feld <boris.feld@octobus.net>
parents: 38821
diff changeset
    65
      empty     :  1 (33.33%)
39119
a456c603a83d debugrevlog: display details about empty revision
Boris Feld <boris.feld@octobus.net>
parents: 39118
diff changeset
    66
                     text  :  1 (100.00%)
a456c603a83d debugrevlog: display details about empty revision
Boris Feld <boris.feld@octobus.net>
parents: 39118
diff changeset
    67
                     delta :  0 ( 0.00%)
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    68
      snapshot  :  2 (66.67%)
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    69
        lvl-0   :        2 (66.67%)
17188
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    70
      deltas    :  0 ( 0.00%)
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    71
  revision size : 88
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    72
      snapshot  : 88 (100.00%)
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    73
        lvl-0   :       88 (100.00%)
17188
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    74
      deltas    :  0 ( 0.00%)
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    75
  
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    76
  chunks        :  3
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    77
      empty     :  1 (33.33%)
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    78
      0x75 (u)  :  2 (66.67%)
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    79
  chunks size   : 88
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    80
      empty     :  0 ( 0.00%)
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    81
      0x75 (u)  : 88 (100.00%)
30461
932b18c95e11 commands: print chunk type in debugrevlog
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27263
diff changeset
    82
  
33074
e21b750c9b9e debugrevlog: align chain length, reach, and compression ratio
Yuya Nishihara <yuya@tcha.org>
parents: 33069
diff changeset
    83
  avg chain length  :  0
e21b750c9b9e debugrevlog: align chain length, reach, and compression ratio
Yuya Nishihara <yuya@tcha.org>
parents: 33069
diff changeset
    84
  max chain length  :  0
e21b750c9b9e debugrevlog: align chain length, reach, and compression ratio
Yuya Nishihara <yuya@tcha.org>
parents: 33069
diff changeset
    85
  max chain reach   : 44
e21b750c9b9e debugrevlog: align chain length, reach, and compression ratio
Yuya Nishihara <yuya@tcha.org>
parents: 33069
diff changeset
    86
  compression ratio :  0
17188
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    87
  
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
    88
  uncompressed data size (min/max/avg) : 0 / 43 / 28
39118
195ed920653e debugrevlog: track empty revlog entries
Boris Feld <boris.feld@octobus.net>
parents: 38821
diff changeset
    89
  full revision size (min/max/avg)     : 44 / 44 / 44
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
    90
  inter-snapshot size (min/max/avg)    : 0 / 0 / 0
17188
76e55914c303 debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    91
  delta size (min/max/avg)             : 0 / 0 / 0
39181
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    92
  $ hg debugrevlog a
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    93
  format : 1
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    94
  flags  : inline, generaldelta
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    95
  
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    96
  revisions     : 1
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    97
      merges    : 0 ( 0.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    98
      normal    : 1 (100.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
    99
  revisions     : 1
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   100
      empty     : 0 ( 0.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   101
                     text  : 0 (100.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   102
                     delta : 0 (100.00%)
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
   103
      snapshot  : 1 (100.00%)
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
   104
        lvl-0   :       1 (100.00%)
39181
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   105
      deltas    : 0 ( 0.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   106
  revision size : 3
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
   107
      snapshot  : 3 (100.00%)
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
   108
        lvl-0   :       3 (100.00%)
39181
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   109
      deltas    : 0 ( 0.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   110
  
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   111
  chunks        : 1
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   112
      0x75 (u)  : 1 (100.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   113
  chunks size   : 3
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   114
      0x75 (u)  : 3 (100.00%)
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   115
  
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   116
  avg chain length  : 0
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   117
  max chain length  : 0
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   118
  max chain reach   : 3
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   119
  compression ratio : 0
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   120
  
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   121
  uncompressed data size (min/max/avg) : 2 / 2 / 2
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   122
  full revision size (min/max/avg)     : 3 / 3 / 3
39186
9d6fab487c13 debugrevlog: display snapshot details per depth
Boris Feld <boris.feld@octobus.net>
parents: 39184
diff changeset
   123
  inter-snapshot size (min/max/avg)    : 0 / 0 / 0
39181
1464183343b3 debugrevlog: fix for non-manifest object
Boris Feld <boris.feld@octobus.net>
parents: 39119
diff changeset
   124
  delta size (min/max/avg)             : 0 / 0 / 0
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37413
diff changeset
   125
#endif
20244
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   126
37285
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   127
Test debugindex, with and without the --verbose/--debug flag
39309
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   128
  $ hg debugrevlogindex a
37285
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   129
     rev linkrev nodeid       p1           p2
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   130
       0       0 b789fdd96dc2 000000000000 000000000000
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   131
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37413
diff changeset
   132
#if no-reposimplestore
39309
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   133
  $ hg --verbose debugrevlogindex a
37284
009d0283de5f debugcommands: drop base revision from debugindex
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37056
diff changeset
   134
     rev    offset  length linkrev nodeid       p1           p2
009d0283de5f debugcommands: drop base revision from debugindex
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37056
diff changeset
   135
       0         0       3       0 b789fdd96dc2 000000000000 000000000000
37285
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   136
39309
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   137
  $ hg --debug debugrevlogindex a
37284
009d0283de5f debugcommands: drop base revision from debugindex
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37056
diff changeset
   138
     rev    offset  length linkrev nodeid                                   p1                                       p2
009d0283de5f debugcommands: drop base revision from debugindex
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37056
diff changeset
   139
       0         0       3       0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37413
diff changeset
   140
#endif
37285
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   141
39309
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   142
  $ hg debugrevlogindex -f 1 a
37285
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   143
     rev flag     size   link     p1     p2       nodeid
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   144
       0 0000        2      0     -1     -1 b789fdd96dc2
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   145
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37413
diff changeset
   146
#if no-reposimplestore
39309
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   147
  $ hg --verbose debugrevlogindex -f 1 a
37284
009d0283de5f debugcommands: drop base revision from debugindex
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37056
diff changeset
   148
     rev flag   offset   length     size   link     p1     p2       nodeid
009d0283de5f debugcommands: drop base revision from debugindex
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37056
diff changeset
   149
       0 0000        0        3        2      0     -1     -1 b789fdd96dc2
37285
d4e62df1c73d debugcommands: drop offset and length from debugindex by default
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37284
diff changeset
   150
39309
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   151
  $ hg --debug debugrevlogindex -f 1 a
37284
009d0283de5f debugcommands: drop base revision from debugindex
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37056
diff changeset
   152
     rev flag   offset   length     size   link     p1     p2                                   nodeid
009d0283de5f debugcommands: drop base revision from debugindex
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37056
diff changeset
   153
       0 0000        0        3        2      0     -1     -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37413
diff changeset
   154
#endif
23547
21446f4d5c62 debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents: 23256
diff changeset
   155
39309
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   156
  $ hg debugindex -c
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   157
     rev linkrev nodeid       p1           p2
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   158
       0       0 07f494440405 000000000000 000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   159
       1       1 8cccb4b5fec2 07f494440405 000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   160
       2       2 b1e228c512c5 8cccb4b5fec2 000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   161
  $ hg debugindex -c --debug
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   162
     rev linkrev nodeid                                   p1                                       p2
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   163
       0       0 07f4944404050f47db2e5c5071e0e84e7a27bba9 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   164
       1       1 8cccb4b5fec20cafeb99dd01c26d4dee8ea4388a 07f4944404050f47db2e5c5071e0e84e7a27bba9 0000000000000000000000000000000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   165
       2       2 b1e228c512c5d7066d70562ed839c3323a62d6d2 8cccb4b5fec20cafeb99dd01c26d4dee8ea4388a 0000000000000000000000000000000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   166
  $ hg debugindex -m
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   167
     rev linkrev nodeid       p1           p2
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   168
       0       0 a0c8bcbbb45c 000000000000 000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   169
       1       1 57faf8a737ae a0c8bcbbb45c 000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   170
       2       2 a35b10320954 57faf8a737ae 000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   171
  $ hg debugindex -m --debug
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   172
     rev linkrev nodeid                                   p1                                       p2
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   173
       0       0 a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   174
       1       1 57faf8a737ae7faf490582941a82319ba6529dca a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 0000000000000000000000000000000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   175
       2       2 a35b103209548032201c16c7688cb2657f037a38 57faf8a737ae7faf490582941a82319ba6529dca 0000000000000000000000000000000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   176
  $ hg debugindex a
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   177
     rev linkrev nodeid       p1           p2
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   178
       0       0 b789fdd96dc2 000000000000 000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   179
  $ hg debugindex --debug a
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   180
     rev linkrev nodeid                                   p1                                       p2
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   181
       0       0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
828a45233036 debugcommands: introduce debugrevlogindex (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
   182
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   183
debugdelta chain basic output
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   184
40365
4f37af86d5d5 debugcommands: avoid stack trace from debugindexstats in pure mode
Martin von Zweigbergk <martinvonz@google.com>
parents: 40263
diff changeset
   185
#if reporevlogstore pure
4f37af86d5d5 debugcommands: avoid stack trace from debugindexstats in pure mode
Martin von Zweigbergk <martinvonz@google.com>
parents: 40263
diff changeset
   186
  $ hg debugindexstats
4f37af86d5d5 debugcommands: avoid stack trace from debugindexstats in pure mode
Martin von Zweigbergk <martinvonz@google.com>
parents: 40263
diff changeset
   187
  abort: debugindexstats only works with native code
4f37af86d5d5 debugcommands: avoid stack trace from debugindexstats in pure mode
Martin von Zweigbergk <martinvonz@google.com>
parents: 40263
diff changeset
   188
  [255]
4f37af86d5d5 debugcommands: avoid stack trace from debugindexstats in pure mode
Martin von Zweigbergk <martinvonz@google.com>
parents: 40263
diff changeset
   189
#endif
4f37af86d5d5 debugcommands: avoid stack trace from debugindexstats in pure mode
Martin von Zweigbergk <martinvonz@google.com>
parents: 40263
diff changeset
   190
#if reporevlogstore no-pure
39981
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   191
  $ hg debugindexstats
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   192
  node trie capacity: 4
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   193
  node trie count: 2
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   194
  node trie depth: 1
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   195
  node trie last rev scanned: -1
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   196
  node trie lookups: 4
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   197
  node trie misses: 1
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   198
  node trie splits: 1
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   199
  revs in memory: 3
40365
4f37af86d5d5 debugcommands: avoid stack trace from debugindexstats in pure mode
Martin von Zweigbergk <martinvonz@google.com>
parents: 40263
diff changeset
   200
#endif
39981
d71e0ba34d9b debugcommands: add a debugindexstats command
Martin von Zweigbergk <martinvonz@google.com>
parents: 39907
diff changeset
   201
40365
4f37af86d5d5 debugcommands: avoid stack trace from debugindexstats in pure mode
Martin von Zweigbergk <martinvonz@google.com>
parents: 40263
diff changeset
   202
#if reporevlogstore no-pure
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   203
  $ hg debugdeltachain -m
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   204
      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   205
        0       1        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   206
        1       2        1       -1    base          0          0          0   0.00000         0         0    0.00000          0          0   1.00000        1
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   207
        2       3        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   208
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   209
  $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n'
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   210
  0 1 1
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   211
  1 2 1
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   212
  2 3 1
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   213
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   214
  $ hg debugdeltachain -m -Tjson
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   215
  [
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   216
   {
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   217
    "chainid": 1,
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   218
    "chainlen": 1,
40263
8cf459d8b111 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net>
parents: 39981
diff changeset
   219
    "chainratio": 1.02325581395, (no-py3 !)
8cf459d8b111 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net>
parents: 39981
diff changeset
   220
    "chainratio": 1.0232558139534884, (py3 !)
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   221
    "chainsize": 44,
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   222
    "compsize": 44,
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   223
    "deltatype": "base",
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   224
    "extradist": 0,
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   225
    "extraratio": 0.0,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   226
    "largestblock": 44,
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   227
    "lindist": 44,
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   228
    "prevrev": -1,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   229
    "readdensity": 1.0,
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   230
    "readsize": 44,
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   231
    "rev": 0,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   232
    "srchunks": 1,
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   233
    "uncompsize": 43
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   234
   },
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   235
   {
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   236
    "chainid": 2,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   237
    "chainlen": 1,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   238
    "chainratio": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   239
    "chainsize": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   240
    "compsize": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   241
    "deltatype": "base",
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   242
    "extradist": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   243
    "extraratio": 0,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   244
    "largestblock": 0,
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   245
    "lindist": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   246
    "prevrev": -1,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   247
    "readdensity": 1,
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   248
    "readsize": 0,
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   249
    "rev": 1,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   250
    "srchunks": 1,
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   251
    "uncompsize": 0
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   252
   },
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   253
   {
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   254
    "chainid": 3,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   255
    "chainlen": 1,
40263
8cf459d8b111 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net>
parents: 39981
diff changeset
   256
    "chainratio": 1.02325581395, (no-py3 !)
8cf459d8b111 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net>
parents: 39981
diff changeset
   257
    "chainratio": 1.0232558139534884, (py3 !)
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   258
    "chainsize": 44,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   259
    "compsize": 44,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   260
    "deltatype": "base",
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   261
    "extradist": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   262
    "extraratio": 0.0,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   263
    "largestblock": 44,
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   264
    "lindist": 44,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   265
    "prevrev": -1,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   266
    "readdensity": 1.0,
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   267
    "readsize": 44,
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   268
    "rev": 2,
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   269
    "srchunks": 1,
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   270
    "uncompsize": 43
27263
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   271
   }
4efb36ecaaec commands: add debugdeltachain command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26918
diff changeset
   272
  ]
23547
21446f4d5c62 debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents: 23256
diff changeset
   273
35082
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   274
debugdelta chain with sparse read enabled
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   275
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   276
  $ cat >> $HGRCPATH <<EOF
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   277
  > [experimental]
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   278
  > sparse-read = True
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   279
  > EOF
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   280
  $ hg debugdeltachain -m
35678
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   281
      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   282
        0       1        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   283
        1       2        1       -1    base          0          0          0   0.00000         0         0    0.00000          0          0   1.00000        1
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   284
        2       3        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
35082
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   285
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   286
  $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n'
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   287
  0 1 1 44 44 1.0
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   288
  1 2 1 0 0 1
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   289
  2 3 1 44 44 1.0
35082
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   290
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   291
  $ hg debugdeltachain -m -Tjson
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   292
  [
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   293
   {
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   294
    "chainid": 1,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   295
    "chainlen": 1,
40263
8cf459d8b111 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net>
parents: 39981
diff changeset
   296
    "chainratio": 1.02325581395, (no-py3 !)
8cf459d8b111 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net>
parents: 39981
diff changeset
   297
    "chainratio": 1.0232558139534884, (py3 !)
35082
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   298
    "chainsize": 44,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   299
    "compsize": 44,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   300
    "deltatype": "base",
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   301
    "extradist": 0,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   302
    "extraratio": 0.0,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   303
    "largestblock": 44,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   304
    "lindist": 44,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   305
    "prevrev": -1,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   306
    "readdensity": 1.0,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   307
    "readsize": 44,
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   308
    "rev": 0,
35678
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   309
    "srchunks": 1,
35082
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   310
    "uncompsize": 43
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   311
   },
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   312
   {
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   313
    "chainid": 2,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   314
    "chainlen": 1,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   315
    "chainratio": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   316
    "chainsize": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   317
    "compsize": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   318
    "deltatype": "base",
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   319
    "extradist": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   320
    "extraratio": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   321
    "largestblock": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   322
    "lindist": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   323
    "prevrev": -1,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   324
    "readdensity": 1,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   325
    "readsize": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   326
    "rev": 1,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   327
    "srchunks": 1,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   328
    "uncompsize": 0
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   329
   },
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   330
   {
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   331
    "chainid": 3,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   332
    "chainlen": 1,
40263
8cf459d8b111 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net>
parents: 39981
diff changeset
   333
    "chainratio": 1.02325581395, (no-py3 !)
8cf459d8b111 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net>
parents: 39981
diff changeset
   334
    "chainratio": 1.0232558139534884, (py3 !)
38647
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   335
    "chainsize": 44,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   336
    "compsize": 44,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   337
    "deltatype": "base",
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   338
    "extradist": 0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   339
    "extraratio": 0.0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   340
    "largestblock": 44,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   341
    "lindist": 44,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   342
    "prevrev": -1,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   343
    "readdensity": 1.0,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   344
    "readsize": 44,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   345
    "rev": 2,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   346
    "srchunks": 1,
0f4c2c70e26e debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net>
parents: 38449
diff changeset
   347
    "uncompsize": 43
35082
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   348
   }
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   349
  ]
5cbbef8d2a57 debugdeltachain: output information about sparse read if enabled
Paul Morelle <paul.morelle@octobus.net>
parents: 35016
diff changeset
   350
35678
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   351
  $ printf "This test checks things.\n" >> a
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   352
  $ hg ci -m a
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   353
  $ hg branch other
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   354
  marked working directory as branch other
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   355
  (branches are permanent and global, did you want a bookmark?)
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   356
  $ for i in `$TESTDIR/seq.py 5`; do
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   357
  >   printf "shorter ${i}" >> a
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   358
  >   hg ci -m "a other:$i"
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   359
  >   hg up -q default
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   360
  >   printf "for the branch default we want longer chains: ${i}" >> a
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   361
  >   hg ci -m "a default:$i"
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   362
  >   hg up -q other
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   363
  > done
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   364
  $ hg debugdeltachain a -T '{rev} {srchunks}\n' \
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   365
  >    --config experimental.sparse-read.density-threshold=0.50 \
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   366
  >    --config experimental.sparse-read.min-gap-size=0
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   367
  0 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   368
  1 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   369
  2 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   370
  3 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   371
  4 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   372
  5 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   373
  6 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   374
  7 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   375
  8 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   376
  9 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   377
  10 2
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   378
  11 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   379
  $ hg --config extensions.strip= strip --no-backup -r 1
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   380
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43154a76f392 debugdeltachain: display how many chunks would be read in sparse-read mode
Paul Morelle <paul.morelle@octobus.net>
parents: 35402
diff changeset
   381
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   382
Test max chain len
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   383
  $ cat >> $HGRCPATH << EOF
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   384
  > [format]
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   385
  > maxchainlen=4
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   386
  > EOF
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   387
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   388
  $ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   389
  $ hg ci -m a
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   390
  $ printf "b\n" >> a
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   391
  $ hg ci -m a
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   392
  $ printf "c\n" >> a
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   393
  $ hg ci -m a
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   394
  $ printf "d\n" >> a
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   395
  $ hg ci -m a
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   396
  $ printf "e\n" >> a
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   397
  $ hg ci -m a
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   398
  $ printf "f\n" >> a
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   399
  $ hg ci -m a
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   400
  $ printf 'g\n' >> a
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   401
  $ hg ci -m a
23256
1c11393d5dfb localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents: 23255
diff changeset
   402
  $ printf 'h\n' >> a
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   403
  $ hg ci -m a
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37413
diff changeset
   404
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   405
  $ hg debugrevlog -d a
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   406
  # rev p1rev p2rev start   end deltastart base   p1   p2 rawsize totalsize compression heads chainlen
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   407
      0    -1    -1     0   ???          0    0    0    0     ???      ????           ?     1        0 (glob)
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   408
      1     0    -1   ???   ???          0    0    0    0     ???      ????           ?     1        1 (glob)
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   409
      2     1    -1   ???   ???        ???  ???  ???    0     ???      ????           ?     1        2 (glob)
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   410
      3     2    -1   ???   ???        ???  ???  ???    0     ???      ????           ?     1        3 (glob)
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   411
      4     3    -1   ???   ???        ???  ???  ???    0     ???      ????           ?     1        4 (glob)
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   412
      5     4    -1   ???   ???        ???  ???  ???    0     ???      ????           ?     1        0 (glob)
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   413
      6     5    -1   ???   ???        ???  ???  ???    0     ???      ????           ?     1        1 (glob)
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   414
      7     6    -1   ???   ???        ???  ???  ???    0     ???      ????           ?     1        2 (glob)
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   415
      8     7    -1   ???   ???        ???  ???  ???    0     ???      ????           ?     1        3 (glob)
37416
7542e97c7867 tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37413
diff changeset
   416
#endif
32305
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   417
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   418
Test debuglocks command:
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   419
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   420
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   421
  lock:  free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   422
  wlock: free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   423
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   424
* Test setting the lock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   425
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   426
waitlock <file> will wait for file to be created. If it isn't in a reasonable
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   427
amount of time, displays error message and returns 1
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   428
  $ waitlock() {
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   429
  >     start=`date +%s`
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   430
  >     timeout=5
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   431
  >     while [ \( ! -f $1 \) -a \( ! -L $1 \) ]; do
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   432
  >         now=`date +%s`
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   433
  >         if [ "`expr $now - $start`" -gt $timeout ]; then
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   434
  >             echo "timeout: $1 was not created in $timeout seconds"
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   435
  >             return 1
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   436
  >         fi
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   437
  >         sleep 0.1
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   438
  >     done
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   439
  > }
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   440
  $ dolock() {
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   441
  >     {
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   442
  >         waitlock .hg/unlock
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   443
  >         rm -f .hg/unlock
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   444
  >         echo y
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   445
  >     } | hg debuglocks "$@" > /dev/null
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   446
  > }
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   447
  $ dolock -s &
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   448
  $ waitlock .hg/store/lock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   449
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   450
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   451
  lock:  user *, process * (*s) (glob)
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   452
  wlock: free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   453
  [1]
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   454
  $ touch .hg/unlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   455
  $ wait
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   456
  $ [ -f .hg/store/lock ] || echo "There is no lock"
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   457
  There is no lock
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   458
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   459
* Test setting the wlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   460
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   461
  $ dolock -S &
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   462
  $ waitlock .hg/wlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   463
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   464
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   465
  lock:  free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   466
  wlock: user *, process * (*s) (glob)
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   467
  [1]
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   468
  $ touch .hg/unlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   469
  $ wait
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   470
  $ [ -f .hg/wlock ] || echo "There is no wlock"
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   471
  There is no wlock
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   472
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   473
* Test setting both locks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   474
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   475
  $ dolock -Ss &
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   476
  $ waitlock .hg/wlock && waitlock .hg/store/lock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   477
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   478
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   479
  lock:  user *, process * (*s) (glob)
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   480
  wlock: user *, process * (*s) (glob)
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   481
  [2]
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   482
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   483
* Test failing to set a lock
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   484
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   485
  $ hg debuglocks -s
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   486
  abort: lock is already held
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   487
  [255]
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   488
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   489
  $ hg debuglocks -S
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   490
  abort: wlock is already held
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   491
  [255]
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   492
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   493
  $ touch .hg/unlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   494
  $ wait
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   495
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   496
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   497
  lock:  free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   498
  wlock: free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   499
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   500
* Test forcing the lock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   501
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   502
  $ dolock -s &
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   503
  $ waitlock .hg/store/lock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   504
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   505
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   506
  lock:  user *, process * (*s) (glob)
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   507
  wlock: free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   508
  [1]
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   509
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   510
  $ hg debuglocks -L
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   511
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   512
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   513
  lock:  free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   514
  wlock: free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   515
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   516
  $ touch .hg/unlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   517
  $ wait
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   518
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   519
* Test forcing the wlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   520
35402
12055fb3ba30 debuglocks: allow setting a lock
Paul Morelle <paul.morelle@octobus.net>
parents: 35401
diff changeset
   521
  $ dolock -S &
35401
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   522
  $ waitlock .hg/wlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   523
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   524
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   525
  lock:  free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   526
  wlock: user *, process * (*s) (glob)
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   527
  [1]
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   528
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   529
  $ hg debuglocks -W
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   530
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   531
  $ hg debuglocks
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   532
  lock:  free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   533
  wlock: free
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   534
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   535
  $ touch .hg/unlock
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   536
  $ wait
a43b2dd95e4f debuglocks: add tests (and fix typo in early return)
Paul Morelle <paul.morelle@octobus.net>
parents: 35268
diff changeset
   537
32679
7b17f9de6d3e revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents: 32307
diff changeset
   538
Test WdirUnsupported exception
7b17f9de6d3e revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents: 32307
diff changeset
   539
7b17f9de6d3e revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents: 32307
diff changeset
   540
  $ hg debugdata -c ffffffffffffffffffffffffffffffffffffffff
7b17f9de6d3e revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents: 32307
diff changeset
   541
  abort: working directory revision cannot be specified
7b17f9de6d3e revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents: 32307
diff changeset
   542
  [255]
7b17f9de6d3e revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org>
parents: 32307
diff changeset
   543
32305
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   544
Test cache warming command
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   545
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   546
  $ rm -rf .hg/cache/
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   547
  $ hg debugupdatecaches --debug
32307
c2380b448265 caches: move the 'updating the branch cache' message in 'updatecaches'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 32305
diff changeset
   548
  updating the branch cache
32305
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   549
  $ ls -r .hg/cache/*
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   550
  .hg/cache/rbc-revs-v1
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   551
  .hg/cache/rbc-names-v1
39350
c11e8894b9ca tests: mark manifestfulltextcache as conditional on revlog store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39309
diff changeset
   552
  .hg/cache/manifestfulltextcache (reporevlogstore !)
32305
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   553
  .hg/cache/branch2-served
ccef71de7d41 caches: introduce a 'debugupdatecaches' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31324
diff changeset
   554
37823
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   555
Test debugcolor
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   556
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   557
#if no-windows
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   558
  $ hg debugcolor --style --color always | egrep 'mode|style|log\.'
38449
a0c3d83d5f04 py3: use stringutil.pprint() to print NoneType
Pulkit Goyal <7895pulkit@gmail.com>
parents: 37823
diff changeset
   559
  color mode: 'ansi'
37823
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   560
  available style:
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   561
  \x1b[0;33mlog.changeset\x1b[0m:                      \x1b[0;33myellow\x1b[0m (esc)
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   562
#endif
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   563
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   564
  $ hg debugcolor --style --color never
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   565
  color mode: None
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   566
  available style:
0e9ddab2bac2 debugcolor: fix crash by empty styles (issue5856)
Yuya Nishihara <yuya@tcha.org>
parents: 37813
diff changeset
   567
23255
76effa770ff9 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents: 20543
diff changeset
   568
  $ cd ..
20244
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   569
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   570
Test internal debugstacktrace command
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   571
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   572
  $ cat > debugstacktrace.py << EOF
33971
90981271a904 tests: update test-debugcommands to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33074
diff changeset
   573
  > from __future__ import absolute_import
39906
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   574
  > from mercurial import (
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   575
  >     pycompat,
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   576
  >     util,
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   577
  > )
20244
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   578
  > def f():
39906
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   579
  >     util.debugstacktrace(f=pycompat.stdout)
31322
80752c655320 tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents: 30461
diff changeset
   580
  >     g()
20244
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   581
  > def g():
39906
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   582
  >     util.dst(b'hello from g\\n', skip=1)
31322
80752c655320 tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents: 30461
diff changeset
   583
  >     h()
80752c655320 tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents: 30461
diff changeset
   584
  > def h():
39906
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   585
  >     util.dst(b'hi ...\\nfrom h hidden in g', 1, depth=2)
31322
80752c655320 tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents: 30461
diff changeset
   586
  > f()
20244
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   587
  > EOF
39723
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 39350
diff changeset
   588
  $ "$PYTHON" debugstacktrace.py
20244
47d0843647d1 util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents: 17188
diff changeset
   589
  stacktrace at:
39906
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   590
   debugstacktrace.py:14 in * (glob)
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   591
   debugstacktrace.py:7  in f
31323
7c877cbf30d6 util: strip trailing newline from debugstacktrace message
Mads Kiilerich <madski@unity3d.com>
parents: 31322
diff changeset
   592
  hello from g at:
39906
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   593
   debugstacktrace.py:14 in * (glob)
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   594
   debugstacktrace.py:8  in f
31322
80752c655320 tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents: 30461
diff changeset
   595
  hi ...
80752c655320 tests: rework util.debugstacktrace tests
Mads Kiilerich <madski@unity3d.com>
parents: 30461
diff changeset
   596
  from h hidden in g at:
39906
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   597
   debugstacktrace.py:8  in f
8a42aa04ef36 py3: byteify extension in test-debugcommands.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39738
diff changeset
   598
   debugstacktrace.py:11 in g
35015
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   599
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   600
Test debugcapabilities command:
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   601
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   602
  $ hg debugcapabilities ./debugrevlog/
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   603
  Main capabilities:
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   604
    branchmap
35097
62e10bf001a9 test-pattern: actually update tests using the patterns
Boris Feld <boris.feld@octobus.net>
parents: 35082
diff changeset
   605
    $USUAL_BUNDLE2_CAPS$
35015
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   606
    getbundle
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   607
    known
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   608
    lookup
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   609
    pushkey
7ee2d859f720 debug: add a debugcapabilities commands
Boris Feld <boris.feld@octobus.net>
parents: 33971
diff changeset
   610
    unbundle
35016
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   611
  Bundle2 capabilities:
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   612
    HG20
35268
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35097
diff changeset
   613
    bookmarks
35016
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   614
    changegroup
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   615
      01
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   616
      02
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   617
    digests
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   618
      md5
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   619
      sha1
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   620
      sha512
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   621
    error
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   622
      abort
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   623
      unsupportedcontent
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   624
      pushraced
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   625
      pushkey
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   626
    hgtagsfnodes
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   627
    listkeys
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   628
    phases
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   629
      heads
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   630
    pushkey
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   631
    remote-changegroup
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   632
      http
762ea8a1f5e7 debug: print parsed bundle2 capabilities with debugcapabilities
Boris Feld <boris.feld@octobus.net>
parents: 35015
diff changeset
   633
      https
36974
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36641
diff changeset
   634
    rev-branch-cache
35792
1d118f9f4f57 bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35678
diff changeset
   635
    stream
1d118f9f4f57 bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35678
diff changeset
   636
      v2
35969
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   637
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   638
Test debugpeer
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   639
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   640
  $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" debugpeer ssh://user@dummy/debugrevlog
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   641
  url: ssh://user@dummy/debugrevlog
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   642
  local: no
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   643
  pushable: yes
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   644
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   645
  $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" --debug debugpeer ssh://user@dummy/debugrevlog
36028
c64b9adfb371 tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35969
diff changeset
   646
  running "*" "*/tests/dummyssh" 'user@dummy' 'hg -R debugrevlog serve --stdio' (glob) (no-windows !)
c64b9adfb371 tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35969
diff changeset
   647
  running "*" "*\tests/dummyssh" "user@dummy" "hg -R debugrevlog serve --stdio" (glob) (windows !)
37813
58bbd14b0c62 sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents: 37416
diff changeset
   648
  devel-peer-request: hello+between
58bbd14b0c62 sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents: 37416
diff changeset
   649
  devel-peer-request:   pairs: 81 bytes
35969
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   650
  sending hello command
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   651
  sending between command
40909
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   652
  remote: 440
e646fda7be2e test: enable sparse-revlog for test-debugcommands.t
Boris Feld <boris.feld@octobus.net>
parents: 40365
diff changeset
   653
  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
35969
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   654
  remote: 1
37393
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37330
diff changeset
   655
  devel-peer-request: protocaps
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37330
diff changeset
   656
  devel-peer-request:   caps: * bytes (glob)
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 37330
diff changeset
   657
  sending protocaps command
35969
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   658
  url: ssh://user@dummy/debugrevlog
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   659
  local: no
5f029d03cf71 debugcommands: introduce debugpeer command
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35792
diff changeset
   660
  pushable: yes