##// END OF EJS Templates
log: do not accept string-matcher pattern as -u/-b/-B parameter...
Yuya Nishihara -
r46657:1bf2b44c default
parent child Browse files
Show More
@@ -898,13 +898,13 b' def _makenofollowfilematcher(repo, pats,'
898 898 def _makerevset(repo, wopts, slowpath):
899 899 """Return a revset string built from log options and file patterns"""
900 900 opts = {
901 b'branch': [repo.lookupbranch(b) for b in wopts.branches],
901 b'branch': [b'literal:' + repo.lookupbranch(b) for b in wopts.branches],
902 902 b'date': wopts.date,
903 903 b'keyword': wopts.keywords,
904 904 b'no_merges': wopts.no_merges,
905 905 b'only_merges': wopts.only_merges,
906 906 b'prune': wopts.prune_ancestors,
907 b'user': wopts.users,
907 b'user': [b'literal:' + v for v in wopts.users],
908 908 }
909 909
910 910 if wopts.filter_revisions_by_pats and slowpath:
@@ -2310,6 +2310,7 b' def bookmarkrevs(repo, mark):'
2310 2310 def format_bookmark_revspec(mark):
2311 2311 """Build a revset expression to select revisions reachable by a given
2312 2312 bookmark"""
2313 mark = b'literal:' + mark
2313 2314 return revsetlang.formatspec(
2314 2315 b"ancestors(bookmark(%s)) - "
2315 2316 b"ancestors(head() and not bookmark(%s)) - "
@@ -1588,19 +1588,19 b' glog always reorders nodes which explain'
1588 1588 (list
1589 1589 (func
1590 1590 (symbol 'user')
1591 (string 'test'))
1591 (string 'literal:test'))
1592 1592 (func
1593 1593 (symbol 'user')
1594 (string 'not-a-user'))))
1594 (string 'literal:not-a-user'))))
1595 1595 <filteredset
1596 1596 <spanset- 0:37>,
1597 1597 <addset
1598 1598 <filteredset
1599 1599 <fullreposet+ 0:37>,
1600 <user 'test'>>,
1600 <user 'literal:test'>>,
1601 1601 <filteredset
1602 1602 <fullreposet+ 0:37>,
1603 <user 'not-a-user'>>>>
1603 <user 'literal:not-a-user'>>>>
1604 1604 $ testlog -b not-a-branch
1605 1605 abort: unknown revision 'not-a-branch'
1606 1606 abort: unknown revision 'not-a-branch'
@@ -1611,28 +1611,28 b' glog always reorders nodes which explain'
1611 1611 (list
1612 1612 (func
1613 1613 (symbol 'branch')
1614 (string 'default'))
1614 (string 'literal:default'))
1615 1615 (or
1616 1616 (list
1617 1617 (func
1618 1618 (symbol 'branch')
1619 (string 'branch'))
1619 (string 'literal:branch'))
1620 1620 (func
1621 1621 (symbol 'branch')
1622 (string 'branch'))))))
1622 (string 'literal:branch'))))))
1623 1623 <filteredset
1624 1624 <spanset- 0:37>,
1625 1625 <addset
1626 1626 <filteredset
1627 1627 <fullreposet+ 0:37>,
1628 <branch 'default'>>,
1628 <branch 'literal:default'>>,
1629 1629 <addset
1630 1630 <filteredset
1631 1631 <fullreposet+ 0:37>,
1632 <branch 'branch'>>,
1632 <branch 'literal:branch'>>,
1633 1633 <filteredset
1634 1634 <fullreposet+ 0:37>,
1635 <branch 'branch'>>>>>
1635 <branch 'literal:branch'>>>>>
1636 1636 $ testlog -k expand -k merge
1637 1637 []
1638 1638 (or
@@ -1438,19 +1438,19 b' glog always reorders nodes which explain'
1438 1438 (list
1439 1439 (func
1440 1440 (symbol 'user')
1441 (string 'test'))
1441 (string 'literal:test'))
1442 1442 (func
1443 1443 (symbol 'user')
1444 (string 'not-a-user'))))
1444 (string 'literal:not-a-user'))))
1445 1445 <filteredset
1446 1446 <spanset- 0:37>,
1447 1447 <addset
1448 1448 <filteredset
1449 1449 <fullreposet+ 0:37>,
1450 <user 'test'>>,
1450 <user 'literal:test'>>,
1451 1451 <filteredset
1452 1452 <fullreposet+ 0:37>,
1453 <user 'not-a-user'>>>>
1453 <user 'literal:not-a-user'>>>>
1454 1454 $ testlog -b not-a-branch
1455 1455 abort: unknown revision 'not-a-branch'
1456 1456 abort: unknown revision 'not-a-branch'
@@ -1461,28 +1461,28 b' glog always reorders nodes which explain'
1461 1461 (list
1462 1462 (func
1463 1463 (symbol 'branch')
1464 (string 'default'))
1464 (string 'literal:default'))
1465 1465 (or
1466 1466 (list
1467 1467 (func
1468 1468 (symbol 'branch')
1469 (string 'branch'))
1469 (string 'literal:branch'))
1470 1470 (func
1471 1471 (symbol 'branch')
1472 (string 'branch'))))))
1472 (string 'literal:branch'))))))
1473 1473 <filteredset
1474 1474 <spanset- 0:37>,
1475 1475 <addset
1476 1476 <filteredset
1477 1477 <fullreposet+ 0:37>,
1478 <branch 'default'>>,
1478 <branch 'literal:default'>>,
1479 1479 <addset
1480 1480 <filteredset
1481 1481 <fullreposet+ 0:37>,
1482 <branch 'branch'>>,
1482 <branch 'literal:branch'>>,
1483 1483 <filteredset
1484 1484 <fullreposet+ 0:37>,
1485 <branch 'branch'>>>>>
1485 <branch 'literal:branch'>>>>>
1486 1486 $ testlog -k expand -k merge
1487 1487 []
1488 1488 (or
@@ -190,3 +190,9 b' Unknown bookmark:'
190 190 $ hg log -B unknown
191 191 abort: bookmark 'unknown' does not exist
192 192 [255]
193
194 Shouldn't accept string-matcher syntax:
195
196 $ hg log -B 're:.*'
197 abort: bookmark 're:.*' does not exist
198 [255]
@@ -1378,6 +1378,14 b' are specified (issue5100):'
1378 1378 1 k1
1379 1379 0 k0
1380 1380
1381 log -b/-u/-k shouldn't accept string-matcher syntax:
1382
1383 $ hg log -b 're:.*'
1384 abort: unknown revision 're:.*'
1385 [255]
1386 $ hg log -k 're:.*'
1387 $ hg log -u 're:.*'
1388
1381 1389 log FILE in ascending order, against dagrange:
1382 1390
1383 1391 $ hg log -r1:: -T '{rev} {files}\n' f1 f2
General Comments 0
You need to be logged in to leave comments. Login now