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