tests/test-revset2.t
changeset 39912 7b35209ba1a7
parent 39707 5abc47d4ca6b
child 40534 7ed611c60168
equal deleted inserted replaced
39911:d1bc6cf2be69 39912:7b35209ba1a7
   411   [255]
   411   [255]
   412 
   412 
   413 test that chained `or` operations never eat up stack (issue4624)
   413 test that chained `or` operations never eat up stack (issue4624)
   414 (uses `0:1` instead of `0` to avoid future optimization of trivial revisions)
   414 (uses `0:1` instead of `0` to avoid future optimization of trivial revisions)
   415 
   415 
   416   $ hg log -T '{rev}\n' -r `"$PYTHON" -c "print '+'.join(['0:1'] * 500)"`
   416   $ hg log -T '{rev}\n' -r `"$PYTHON" -c "print('+'.join(['0:1'] * 500))"`
   417   0
   417   0
   418   1
   418   1
   419 
   419 
   420 test that repeated `-r` options never eat up stack (issue4565)
   420 test that repeated `-r` options never eat up stack (issue4565)
   421 (uses `-r 0::1` to avoid possible optimization at old-style parser)
   421 (uses `-r 0::1` to avoid possible optimization at old-style parser)
   422 
   422 
   423   $ hg log -T '{rev}\n' `"$PYTHON" -c "for i in range(500): print '-r 0::1 ',"`
   423   $ hg log -T '{rev}\n' `"$PYTHON" -c "for i in range(500): print('-r 0::1 ')"`
   424   0
   424   0
   425   1
   425   1
   426 
   426 
   427 check that conversion to only works
   427 check that conversion to only works
   428   $ try --optimize '::3 - ::1'
   428   $ try --optimize '::3 - ::1'
  1526 
  1526 
  1527   $ hg init problematicencoding
  1527   $ hg init problematicencoding
  1528   $ cd problematicencoding
  1528   $ cd problematicencoding
  1529 
  1529 
  1530   $ "$PYTHON" > setup.sh <<EOF
  1530   $ "$PYTHON" > setup.sh <<EOF
  1531   > print u'''
  1531   > print(u'''
  1532   > echo a > text
  1532   > echo a > text
  1533   > hg add text
  1533   > hg add text
  1534   > hg --encoding utf-8 commit -u '\u30A2' -m none
  1534   > hg --encoding utf-8 commit -u '\u30A2' -m none
  1535   > echo b > text
  1535   > echo b > text
  1536   > hg --encoding utf-8 commit -u '\u30C2' -m none
  1536   > hg --encoding utf-8 commit -u '\u30C2' -m none
  1537   > echo c > text
  1537   > echo c > text
  1538   > hg --encoding utf-8 commit -u none -m '\u30A2'
  1538   > hg --encoding utf-8 commit -u none -m '\u30A2'
  1539   > echo d > text
  1539   > echo d > text
  1540   > hg --encoding utf-8 commit -u none -m '\u30C2'
  1540   > hg --encoding utf-8 commit -u none -m '\u30C2'
  1541   > '''.encode('utf-8')
  1541   > '''.encode('utf-8'))
  1542   > EOF
  1542   > EOF
  1543   $ sh < setup.sh
  1543   $ sh < setup.sh
  1544 
  1544 
  1545 test in problematic encoding
  1545 test in problematic encoding
  1546   $ "$PYTHON" > test.sh <<EOF
  1546   $ "$PYTHON" > test.sh <<EOF
  1547   > print u'''
  1547   > print(u'''
  1548   > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30A2)'
  1548   > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30A2)'
  1549   > echo ====
  1549   > echo ====
  1550   > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30C2)'
  1550   > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30C2)'
  1551   > echo ====
  1551   > echo ====
  1552   > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30A2)'
  1552   > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30A2)'
  1554   > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30C2)'
  1554   > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30C2)'
  1555   > echo ====
  1555   > echo ====
  1556   > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30A2)'
  1556   > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30A2)'
  1557   > echo ====
  1557   > echo ====
  1558   > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30C2)'
  1558   > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30C2)'
  1559   > '''.encode('cp932')
  1559   > '''.encode('cp932'))
  1560   > EOF
  1560   > EOF
  1561   $ sh < test.sh
  1561   $ sh < test.sh
  1562   0
  1562   0
  1563   ====
  1563   ====
  1564   1
  1564   1