diff --git a/tests/test-glog.t b/tests/test-glog.t --- a/tests/test-glog.t +++ b/tests/test-glog.t @@ -88,6 +88,7 @@ o (0) root > commands, > extensions, > revsetlang, + > smartset, > ) > > def logrevset(repo, pats, opts): @@ -99,6 +100,7 @@ o (0) root > 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 @@ o (0) root > 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 @@ glog always reorders nodes which explain $ 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 @@ glog always reorders nodes which explain (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 @@ glog always reorders nodes which explain (func (symbol 'branch') (string 'branch')))) + , + , + >, + , + >, + , + >>>> $ testlog -k expand -k merge [] (or @@ -1501,22 +1527,43 @@ glog always reorders nodes which explain (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 @@ glog always reorders nodes which explain (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 @@ have 2 filelog topological heads in a li $ testlog --follow [] [] + $ testlog -rnull ['null'] [] + $ echo a > a $ echo aa > aa $ echo f > f @@ -1586,6 +1650,8 @@ have 2 filelog topological heads in a li (func (symbol 'filelog') (string 'a')) + , set([0])> $ testlog a b [] (or @@ -1596,6 +1662,11 @@ have 2 filelog topological heads in a li (func (symbol 'filelog') (string 'b')))) + , + , + >> Test falling back to slow path for non-existing files @@ -1608,6 +1679,9 @@ Test falling back to slow path for non-e (string 'd:relpath') (string 'p:a') (string 'p:c'))) + , + > Test multiple --include/--exclude/paths @@ -1624,6 +1698,9 @@ Test multiple --include/--exclude/paths (string 'i:e') (string 'x:b') (string 'x:e'))) + , + > Test glob expansion of pats @@ -1638,6 +1715,8 @@ Test glob expansion of pats (func (symbol 'filelog') (string 'aa')) + , set([0])> Test --follow on a non-existent directory @@ -1661,6 +1740,11 @@ Test --follow on a directory (string 'r:') (string 'd:relpath') (string 'p:dir')))) + , + >, + > $ hg up -q tip Test --follow on file not in parent revision @@ -1684,6 +1768,11 @@ Test --follow and patterns (string 'r:') (string 'd:relpath') (string 'p:glob:*')))) + , + >, + > Test --follow on a single rename @@ -1693,6 +1782,9 @@ Test --follow on a single rename (func (symbol 'follow') (string 'a')) + , + > Test --follow and multiple renames @@ -1702,6 +1794,9 @@ Test --follow and multiple renames (func (symbol 'follow') (string 'e')) + , + > Test --follow and multiple filelog heads @@ -1711,6 +1806,9 @@ Test --follow and multiple filelog heads (func (symbol 'follow') (string 'g')) + , + > $ cat log.nodes nodetag 2 nodetag 1 @@ -1721,6 +1819,9 @@ Test --follow and multiple filelog heads (func (symbol 'follow') (string 'g')) + , + > $ cat log.nodes nodetag 3 nodetag 2 @@ -1738,6 +1839,11 @@ Test --follow and multiple files (func (symbol 'follow') (string 'e')))) + , + , + >> $ cat log.nodes nodetag 4 nodetag 3 @@ -1751,6 +1857,7 @@ Test --follow null parent $ testlog -f [] [] + Test --follow-first @@ -1770,6 +1877,9 @@ Test --follow-first (func (symbol 'rev') (symbol '6'))) + , + > Cannot compare with log --follow-first FILE as it never worked @@ -1778,6 +1888,9 @@ Cannot compare with log --follow-first F (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 @@ Test "set:..." and parent revision (string 'r:') (string 'd:relpath') (string 'p:set:copied()'))) + , + > $ testlog --include "set:copied()" [] (func @@ -1823,15 +1939,20 @@ Test "set:..." and parent revision (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 @@ Test --removed (string 'r:') (string 'd:relpath') (string 'p:a'))) + , + > $ testlog --removed --follow a [] (and @@ -1852,6 +1976,11 @@ Test --removed (string 'r:') (string 'd:relpath') (string 'p:a')))) + , + >, + > Test --patch and --stat with --follow and --follow-first @@ -1955,6 +2084,7 @@ Test old-style --rev $ testlog -r 'foo-bar' ['foo-bar'] [] + Test --follow and forward --rev @@ -2180,6 +2310,9 @@ changessincelatesttag with no prior tag (func (symbol 'rev') (symbol '6'))) + , + > Test --follow-first and forward --rev @@ -2190,6 +2323,9 @@ Test --follow-first and forward --rev (func (symbol 'rev') (symbol '6'))) + , + > --- log.nodes * (glob) +++ glog.nodes * (glob) @@ -1,3 +1,3 @@ @@ -2207,6 +2343,9 @@ Test --follow and backward --rev (func (symbol 'rev') (symbol '6'))) + , + > Test --follow-first and backward --rev @@ -2217,6 +2356,9 @@ Test --follow-first and backward --rev (func (symbol 'rev') (symbol '6'))) + , + > Test --follow with --rev of graphlog extension @@ -2238,16 +2380,24 @@ Test subdir (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 @@ Test --hidden $ testlog [] [] + $ testlog --hidden [] [] + $ hg log -G --template '{rev} {desc}\n' o 7 Added tag foo-bar for changeset fc281d8ff18d |