tests/test-parseindex.t
changeset 48876 42d2b31cee0b
parent 45131 61e7464477ac
child 49052 34cdad07d06d
equal deleted inserted replaced
48875:6000f5b25c9b 48876:42d2b31cee0b
    24   user:        test
    24   user:        test
    25   date:        Thu Jan 01 00:00:00 1970 +0000
    25   date:        Thu Jan 01 00:00:00 1970 +0000
    26   summary:     change foo
    26   summary:     change foo
    27   
    27   
    28   $ cat >> test.py << EOF
    28   $ cat >> test.py << EOF
    29   > from __future__ import print_function
       
    30   > from mercurial import changelog, node, pycompat, vfs
    29   > from mercurial import changelog, node, pycompat, vfs
    31   > 
    30   > 
    32   > class singlebyteread(object):
    31   > class singlebyteread(object):
    33   >     def __init__(self, real):
    32   >     def __init__(self, real):
    34   >         self.real = real
    33   >         self.real = real
    73 Test SEGV caused by bad revision passed to reachableroots() (issue4775):
    72 Test SEGV caused by bad revision passed to reachableroots() (issue4775):
    74 
    73 
    75   $ cd a
    74   $ cd a
    76 
    75 
    77   $ "$PYTHON" <<EOF
    76   $ "$PYTHON" <<EOF
    78   > from __future__ import print_function
       
    79   > from mercurial import changelog, vfs
    77   > from mercurial import changelog, vfs
    80   > cl = changelog.changelog(vfs.vfs(b'.hg/store'))
    78   > cl = changelog.changelog(vfs.vfs(b'.hg/store'))
    81   > print('good heads:')
    79   > print('good heads:')
    82   > for head in [0, len(cl) - 1, -1]:
    80   > for head in [0, len(cl) - 1, -1]:
    83   >     print('%s: %r' % (head, cl.reachableroots(0, [head], [0])))
    81   >     print('%s: %r' % (head, cl.reachableroots(0, [head], [0])))
   175       rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
   173       rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
   176         0       1        1       -1    base         63         62         63   1.01613        63         0    0.00000
   174         0       1        1       -1    base         63         62         63   1.01613        63         0    0.00000
   177         1       2        1       -1    base         66         65         66   1.01538        66         0    0.00000
   175         1       2        1       -1    base         66         65         66   1.01538        66         0    0.00000
   178 
   176 
   179   $ cat <<EOF > test.py
   177   $ cat <<EOF > test.py
   180   > from __future__ import print_function
       
   181   > import sys
   178   > import sys
   182   > from mercurial import changelog, pycompat, vfs
   179   > from mercurial import changelog, pycompat, vfs
   183   > cl = changelog.changelog(vfs.vfs(pycompat.fsencode(sys.argv[1])))
   180   > cl = changelog.changelog(vfs.vfs(pycompat.fsencode(sys.argv[1])))
   184   > n0, n1 = cl.node(0), cl.node(1)
   181   > n0, n1 = cl.node(0), cl.node(1)
   185   > ops = [
   182   > ops = [