Mercurial > public > mercurial-scm > hg
diff tests/test-glog.t @ 16409:2cbd7dd0cc1f
graphlog: fix --follow-first --rev combinations
This solves a similar problem than the previous --follow/--rev patch. This time
we need changelog.ancestors()/descendants() filtering on first parent.
Duplicating the code looked better than introducing keyword arguments. Besides,
the ancestors() version was already implemented in follow() revset.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Wed, 11 Apr 2012 11:25:34 +0200 |
parents | d74099ac2ac1 |
children | 4c2edcd84175 |
line wrap: on
line diff
--- a/tests/test-glog.t Wed Apr 11 11:22:40 2012 +0200 +++ b/tests/test-glog.t Wed Apr 11 11:25:34 2012 +0200 @@ -1746,8 +1746,8 @@ [] (group (func - ('symbol', '_followfirst') - None)) + ('symbol', '_firstancestors') + ('symbol', '6'))) Cannot compare with log --follow-first FILE as it never worked @@ -1967,6 +1967,23 @@ +nodetag 6 [1] +Test --follow-first and forward --rev + + $ testlog --follow-first -r6 -r8 -r5 -r7 -r4 + ['6', '8', '5', '7', '4'] + (group + (func + ('symbol', '_firstdescendants') + ('symbol', '6'))) + --- log.nodes * (glob) + +++ glog.nodes * (glob) + @@ -1,3 +1,3 @@ + -nodetag 6 + nodetag 8 + nodetag 7 + +nodetag 6 + [1] + Test --follow and backward --rev $ testlog --follow -r6 -r5 -r7 -r8 -r4 @@ -1976,3 +1993,11 @@ ('symbol', 'ancestors') ('symbol', '6'))) +Test --follow-first and backward --rev + + $ testlog --follow-first -r6 -r5 -r7 -r8 -r4 + ['6', '5', '7', '8', '4'] + (group + (func + ('symbol', '_firstancestors') + ('symbol', '6')))