fileset: fix generator vs list bug in fast path
$ hg debugfileset 'a or b'
would only return a or b but not both because the base file list was a
generator instead of a replayable sequence.
--- a/mercurial/fileset.py Wed Aug 15 22:28:32 2012 +0200
+++ b/mercurial/fileset.py Wed Aug 15 22:50:23 2012 +0200
@@ -485,7 +485,7 @@
subset.extend(c)
else:
status = None
- subset = ctx.walk(ctx.match([]))
+ subset = list(ctx.walk(ctx.match([])))
return getset(matchctx(ctx, subset, status), tree)
--- a/tests/test-cat.t Wed Aug 15 22:28:32 2012 +0200
+++ b/tests/test-cat.t Wed Aug 15 22:50:23 2012 +0200
@@ -21,3 +21,14 @@
[1]
$ hg cat -r 1 b
1
+
+Test fileset
+
+ $ echo 3 > c
+ $ hg ci -Am addmore c
+ $ hg cat 'set:not(b) or a'
+ 3
+ $ hg cat 'set:c or b'
+ 1
+ 3
+
--- a/tests/test-fileset.t Wed Aug 15 22:28:32 2012 +0200
+++ b/tests/test-fileset.t Wed Aug 15 22:50:23 2012 +0200
@@ -222,4 +222,7 @@
sub
$ fileset -r4 'subrepo("sub")'
sub
+ $ fileset -r4 'b2 or c1'
+ b2
+ c1