Show More
@@ -223,13 +223,9 b' def symbolset(repo, subset, x):' | |||||
223 | return stringset(repo, subset, x) |
|
223 | return stringset(repo, subset, x) | |
224 |
|
224 | |||
225 | def rangeset(repo, subset, x, y): |
|
225 | def rangeset(repo, subset, x, y): | |
226 | m = getset(repo, subset, x) |
|
226 | cl = repo.changelog | |
227 | if not m: |
|
227 | m = getset(repo, cl, x) | |
228 |
|
|
228 | n = getset(repo, cl, y) | |
229 |
|
||||
230 | n = getset(repo, subset, y) |
|
|||
231 | if not n: |
|
|||
232 | n = getset(repo, list(repo), y) |
|
|||
233 |
|
229 | |||
234 | if not m or not n: |
|
230 | if not m or not n: | |
235 | return [] |
|
231 | return [] | |
@@ -326,7 +322,7 b' def ancestorspec(repo, subset, x, n):' | |||||
326 | raise error.ParseError(_("~ expects a number")) |
|
322 | raise error.ParseError(_("~ expects a number")) | |
327 | ps = set() |
|
323 | ps = set() | |
328 | cl = repo.changelog |
|
324 | cl = repo.changelog | |
329 |
for r in getset(repo, |
|
325 | for r in getset(repo, cl, x): | |
330 | for i in range(n): |
|
326 | for i in range(n): | |
331 | r = cl.parentrevs(r)[0] |
|
327 | r = cl.parentrevs(r)[0] | |
332 | ps.add(r) |
|
328 | ps.add(r) | |
@@ -1139,7 +1135,7 b' def parentspec(repo, subset, x, n):' | |||||
1139 | raise error.ParseError(_("^ expects a number 0, 1, or 2")) |
|
1135 | raise error.ParseError(_("^ expects a number 0, 1, or 2")) | |
1140 | ps = set() |
|
1136 | ps = set() | |
1141 | cl = repo.changelog |
|
1137 | cl = repo.changelog | |
1142 |
for r in getset(repo, |
|
1138 | for r in getset(repo, cl, x): | |
1143 | if n == 0: |
|
1139 | if n == 0: | |
1144 | ps.add(r) |
|
1140 | ps.add(r) | |
1145 | elif n == 1: |
|
1141 | elif n == 1: |
@@ -758,6 +758,37 b' test revsets started with 40-chars hash ' | |||||
758 | $ hg log -r "${ISSUE3669_TIP}^" --template '{rev}\n' |
|
758 | $ hg log -r "${ISSUE3669_TIP}^" --template '{rev}\n' | |
759 | 8 |
|
759 | 8 | |
760 |
|
760 | |||
|
761 | test or-ed indirect predicates (issue3775) | |||
|
762 | ||||
|
763 | $ log '6 or 6^1' | sort | |||
|
764 | 5 | |||
|
765 | 6 | |||
|
766 | $ log '6^1 or 6' | sort | |||
|
767 | 5 | |||
|
768 | 6 | |||
|
769 | $ log '4 or 4~1' | sort | |||
|
770 | 2 | |||
|
771 | 4 | |||
|
772 | $ log '4~1 or 4' | sort | |||
|
773 | 2 | |||
|
774 | 4 | |||
|
775 | $ log '(0 or 2):(4 or 6) or 0 or 6' | sort | |||
|
776 | 0 | |||
|
777 | 1 | |||
|
778 | 2 | |||
|
779 | 3 | |||
|
780 | 4 | |||
|
781 | 5 | |||
|
782 | 6 | |||
|
783 | $ log '0 or 6 or (0 or 2):(4 or 6)' | sort | |||
|
784 | 0 | |||
|
785 | 1 | |||
|
786 | 2 | |||
|
787 | 3 | |||
|
788 | 4 | |||
|
789 | 5 | |||
|
790 | 6 | |||
|
791 | ||||
761 | tests for 'remote()' predicate: |
|
792 | tests for 'remote()' predicate: | |
762 | #. (csets in remote) (id) (remote) |
|
793 | #. (csets in remote) (id) (remote) | |
763 | 1. less than local current branch "default" |
|
794 | 1. less than local current branch "default" |
General Comments 0
You need to be logged in to leave comments.
Login now