test: use bundle2 in test-pull-http
This test has a minor output change when using bundle2. We make this
change early to reduce the noise in the final change.
test: use bundle2 in test-push-http
Now that we have a bundle1 version of this test, we can move the original
to bundle2. This lets us handle the ouput change from using the bundle2
protocol earlier.
test: copy test-push-http.t to testpush-http-bundle1.t
We want to keep both code paths tested. The test is a bit too extensive to
simply introduce dual testing in it, so we make a copy for each protocol
version.
tests: add (?) flag for optional lines
When the test engine fails to match output on a line marked with (?),
it will simply continue to the next expected line and try again. This
allows simplifying tests that have either version-specific or
non-fixed behavior, for instance:
$ coin-flip
heads (?)
tails (?)
(There's no form of back-tracking attempted, so optional matches
should be specific.)
templatekw: display active bookmark more consistently (
issue4552) (BC)
Previously, the template keyword '{activebookmark}' would only display the
active bookmark if it was also pointing to the working directory's parent.
Meanwhile, the '{active}' subkeyword of the '{bookmarks}' keyword displays
the active bookmark regardless of whether it also points to the working
directory's parent. This is confusing.
Consider the output of these two templates:
$ hg log -T '{activebookmark}\n' -r indent
$ hg log -T '{bookmarks % "{bookmark}"}\n' -r indent
indent
This is the current behavior that can arise after, eg, a pull moves a bookmark
out from under you. After this patch, the first template will also return the
active bookmark that points to a revision, even if it is not the current
parent of the working directory. A test has been added to show the new behavior.
revrange: build spanset from x:y range
This slightly improves the performance in the optimal case:
% hg log -R mozilla-central -r0:tip -l1 --time
(before)
time: real 0.050 secs (user 0.040+0.000 sys 0.010+0.000)
(after)
time: real 0.020 secs (user 0.000+0.000 sys 0.010+0.000)
revrange: build balanced tree of addsets from revisions (
issue4565)
This reduces the stack depth from O(n) to O(log(n)). Therefore, repeated
-rREV options will never exceed the Python stack limit.
Currently it depends on private revset._combinesets() function. But at some
point, we'll be able to drop the old-style parser, and revrange() can be
completely rewritten without using _combinesets():
trees = [parse(s) for s in revs]
optimize(('or',) + trees) # combine trees and optimize at once
...
Blockers that prevent eliminating old-style parser:
- nullary ":" operator
- revrange(repo, [intrev, ...]), can be mapped to 'rev(%d)' ?
- revrange(repo, [binnode, ...]), should be banned ?
revrange: clean up meaningless reconstruction of sets
They just exist for deduplication that was removed by the previous patch.