Show More
@@ -709,7 +709,7 b' def revrange(repo, revs):' | |||
|
709 | 709 | return defval |
|
710 | 710 | return repo[val].rev() |
|
711 | 711 | |
|
712 | l = revset.baseset([]) | |
|
712 | subsets = [] | |
|
713 | 713 | |
|
714 | 714 | revsetaliases = [alias for (alias, _) in |
|
715 | 715 | repo.ui.configitems("revsetalias")] |
@@ -725,7 +725,7 b' def revrange(repo, revs):' | |||
|
725 | 725 | raise error.RepoLookupError |
|
726 | 726 | |
|
727 | 727 | if isinstance(spec, int): |
|
728 |
|
|
|
728 | subsets.append(revset.baseset([spec])) | |
|
729 | 729 | continue |
|
730 | 730 | |
|
731 | 731 | if _revrangesep in spec: |
@@ -738,27 +738,21 b' def revrange(repo, revs):' | |||
|
738 | 738 | if end == nullrev and start < 0: |
|
739 | 739 | start = nullrev |
|
740 | 740 | rangeiter = repo.changelog.revs(start, end) |
|
741 | if not l: | |
|
742 | # by far the most common case: revs = ["-1:0"] | |
|
743 | l = revset.baseset(rangeiter) | |
|
744 | continue | |
|
745 | l = l + revset.baseset(rangeiter) | |
|
741 | l = revset.baseset(rangeiter) | |
|
742 | subsets.append(l) | |
|
746 | 743 | continue |
|
747 | 744 | elif spec and spec in repo: # single unquoted rev |
|
748 | 745 | rev = revfix(repo, spec, None) |
|
749 |
|
|
|
746 | subsets.append(revset.baseset([rev])) | |
|
750 | 747 | continue |
|
751 | 748 | except error.RepoLookupError: |
|
752 | 749 | pass |
|
753 | 750 | |
|
754 | 751 | # fall through to new-style queries if old-style fails |
|
755 | 752 | m = revset.match(repo.ui, spec, repo) |
|
756 | if l: | |
|
757 | l = l + m(repo) | |
|
758 | else: | |
|
759 | l = m(repo) | |
|
753 | subsets.append(m(repo)) | |
|
760 | 754 | |
|
761 | return l | |
|
755 | return revset._combinesets(subsets) | |
|
762 | 756 | |
|
763 | 757 | def expandpats(pats): |
|
764 | 758 | '''Expand bare globs when running on windows. |
@@ -1084,6 +1084,13 b' test that chained `or` operations never ' | |||
|
1084 | 1084 | 0 |
|
1085 | 1085 | 1 |
|
1086 | 1086 | |
|
1087 | test that repeated `-r` options never eat up stack (issue4565) | |
|
1088 | (uses `-r 0::1` to avoid possible optimization at old-style parser) | |
|
1089 | ||
|
1090 | $ hg log -T '{rev}\n' `python -c "for i in xrange(500): print '-r 0::1 ',"` | |
|
1091 | 0 | |
|
1092 | 1 | |
|
1093 | ||
|
1087 | 1094 | check that conversion to only works |
|
1088 | 1095 | $ try --optimize '::3 - ::1' |
|
1089 | 1096 | (minus |
General Comments 0
You need to be logged in to leave comments.
Login now