diff -r 99a25bde65a3 -r d984d9b3411e tests/test-glog.t --- a/tests/test-glog.t Wed Jan 03 17:09:16 2018 +0900 +++ b/tests/test-glog.t Wed Jan 03 17:12:30 2018 +0900 @@ -88,6 +88,7 @@ > commands, > extensions, > revsetlang, + > smartset, > ) > > def logrevset(repo, pats, opts): @@ -99,6 +100,7 @@ > def uisetup(ui): > def printrevset(orig, ui, repo, *pats, **opts): > if opts.get('print_revset'): + > revs = cmdutil.getlogrevs(repo, pats, opts)[0] > expr = logrevset(repo, pats, opts) > if expr: > tree = revsetlang.parse(expr) @@ -107,6 +109,7 @@ > tree = [] > ui.write('%r\n' % (opts.get('rev', []),)) > ui.write(revsetlang.prettyformat(tree) + '\n') + > ui.write(smartset.prettyformat(revs) + '\n') > return 0 > return orig(ui, repo, *pats, **opts) > entry = extensions.wrapcommand(commands.table, 'log', printrevset) @@ -1452,6 +1455,7 @@ $ testlog -r 27 -r 25 -r 21 -r 34 -r 32 -r 31 ['27', '25', '21', '34', '32', '31'] [] + --- log.nodes * (glob) +++ glog.nodes * (glob) @@ -1,6 +1,6 @@ @@ -1474,6 +1478,15 @@ (func (symbol 'user') (string 'not-a-user')))) + , + , + >, + , + >>> $ testlog -b not-a-branch abort: unknown revision 'not-a-branch'! abort: unknown revision 'not-a-branch'! @@ -1491,6 +1504,19 @@ (func (symbol 'branch') (string 'branch')))) + , + , + >, + , + >, + , + >>>> $ testlog -k expand -k merge [] (or @@ -1501,22 +1527,43 @@ (func (symbol 'keyword') (string 'merge')))) + , + , + >, + , + >>> $ testlog --only-merges [] (func (symbol 'merge') None) + , + > $ testlog --no-merges [] (not (func (symbol 'merge') None)) + , + , + >>> $ testlog --date '2 0 to 4 0' [] (func (symbol 'date') (string '2 0 to 4 0')) + , + > $ hg log -G -d 'brace ) in a date' hg: parse error: invalid date: 'brace ) in a date' [255] @@ -1537,6 +1584,21 @@ (func (symbol 'ancestors') (string '32')))))) + , + , + , + >>>>, + , + , + >>>> Dedicated repo for --follow and paths filtering. The g is crafted to have 2 filelog topological heads in a linear changeset graph. @@ -1547,9 +1609,11 @@ $ testlog --follow [] [] + $ testlog -rnull ['null'] [] + $ echo a > a $ echo aa > aa $ echo f > f @@ -1586,6 +1650,8 @@ (func (symbol 'filelog') (string 'a')) + , set([0])> $ testlog a b [] (or @@ -1596,6 +1662,11 @@ (func (symbol 'filelog') (string 'b')))) + , + , + >> Test falling back to slow path for non-existing files @@ -1608,6 +1679,9 @@ (string 'd:relpath') (string 'p:a') (string 'p:c'))) + , + > Test multiple --include/--exclude/paths @@ -1624,6 +1698,9 @@ (string 'i:e') (string 'x:b') (string 'x:e'))) + , + > Test glob expansion of pats @@ -1638,6 +1715,8 @@ (func (symbol 'filelog') (string 'aa')) + , set([0])> Test --follow on a non-existent directory @@ -1661,6 +1740,11 @@ (string 'r:') (string 'd:relpath') (string 'p:dir')))) + , + >, + > $ hg up -q tip Test --follow on file not in parent revision @@ -1684,6 +1768,11 @@ (string 'r:') (string 'd:relpath') (string 'p:glob:*')))) + , + >, + > Test --follow on a single rename @@ -1693,6 +1782,9 @@ (func (symbol 'follow') (string 'a')) + , + > Test --follow and multiple renames @@ -1702,6 +1794,9 @@ (func (symbol 'follow') (string 'e')) + , + > Test --follow and multiple filelog heads @@ -1711,6 +1806,9 @@ (func (symbol 'follow') (string 'g')) + , + > $ cat log.nodes nodetag 2 nodetag 1 @@ -1721,6 +1819,9 @@ (func (symbol 'follow') (string 'g')) + , + > $ cat log.nodes nodetag 3 nodetag 2 @@ -1738,6 +1839,11 @@ (func (symbol 'follow') (string 'e')))) + , + , + >> $ cat log.nodes nodetag 4 nodetag 3 @@ -1751,6 +1857,7 @@ $ testlog -f [] [] + Test --follow-first @@ -1770,6 +1877,9 @@ (func (symbol 'rev') (symbol '6'))) + , + > Cannot compare with log --follow-first FILE as it never worked @@ -1778,6 +1888,9 @@ (func (symbol '_followfirst') (string 'e')) + , + > $ hg log -G --follow-first e --template '{rev} {desc|firstline}\n' @ 6 merge 5 and 4 |\ @@ -1815,6 +1928,9 @@ (string 'r:') (string 'd:relpath') (string 'p:set:copied()'))) + , + > $ testlog --include "set:copied()" [] (func @@ -1823,15 +1939,20 @@ (string 'r:') (string 'd:relpath') (string 'i:set:copied()'))) + , + > $ testlog -r "sort(file('set:copied()'), -rev)" ["sort(file('set:copied()'), -rev)"] [] + Test --removed $ testlog --removed [] [] + $ testlog --removed a [] (func @@ -1840,6 +1961,9 @@ (string 'r:') (string 'd:relpath') (string 'p:a'))) + , + > $ testlog --removed --follow a [] (and @@ -1852,6 +1976,11 @@ (string 'r:') (string 'd:relpath') (string 'p:a')))) + , + >, + > Test --patch and --stat with --follow and --follow-first @@ -1955,6 +2084,7 @@ $ testlog -r 'foo-bar' ['foo-bar'] [] + Test --follow and forward --rev @@ -2180,6 +2310,9 @@ (func (symbol 'rev') (symbol '6'))) + , + > Test --follow-first and forward --rev @@ -2190,6 +2323,9 @@ (func (symbol 'rev') (symbol '6'))) + , + > --- log.nodes * (glob) +++ glog.nodes * (glob) @@ -1,3 +1,3 @@ @@ -2207,6 +2343,9 @@ (func (symbol 'rev') (symbol '6'))) + , + > Test --follow-first and backward --rev @@ -2217,6 +2356,9 @@ (func (symbol 'rev') (symbol '6'))) + , + > Test --follow with --rev of graphlog extension @@ -2238,16 +2380,24 @@ (string 'r:') (string 'd:relpath') (string 'p:.'))) + , + > $ testlog ../b [] (func (symbol 'filelog') (string '../b')) + , set([1])> $ testlog -f ../b [] (func (symbol 'follow') (string 'b')) + , + > $ cd .. Test --hidden @@ -2263,9 +2413,11 @@ $ testlog [] [] + $ testlog --hidden [] [] + $ hg log -G --template '{rev} {desc}\n' o 7 Added tag foo-bar for changeset fc281d8ff18d |