##// END OF EJS Templates
debugrevspec: pass lookup function to visualize fallback mechanism...
Yuya Nishihara -
r25901:0203c50a default
parent child Browse files
Show More
@@ -2933,7 +2933,7 b' def debugrevspec(ui, repo, expr, **opts)'
2933 expansion.
2933 expansion.
2934 """
2934 """
2935 if ui.verbose:
2935 if ui.verbose:
2936 tree = revset.parse(expr)
2936 tree = revset.parse(expr, lookup=repo.__contains__)
2937 ui.note(revset.prettyformat(tree), "\n")
2937 ui.note(revset.prettyformat(tree), "\n")
2938 newtree = revset.findaliases(ui, tree)
2938 newtree = revset.findaliases(ui, tree)
2939 if newtree != tree:
2939 if newtree != tree:
@@ -2945,7 +2945,7 b' def debugrevspec(ui, repo, expr, **opts)'
2945 if opts["optimize"]:
2945 if opts["optimize"]:
2946 weight, optimizedtree = revset.optimize(newtree, True)
2946 weight, optimizedtree = revset.optimize(newtree, True)
2947 ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n")
2947 ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n")
2948 func = revset.match(ui, expr)
2948 func = revset.match(ui, expr, repo)
2949 revs = func(repo)
2949 revs = func(repo)
2950 if ui.verbose:
2950 if ui.verbose:
2951 ui.note("* set:\n", revset.prettyformatset(revs), "\n")
2951 ui.note("* set:\n", revset.prettyformatset(revs), "\n")
@@ -197,10 +197,16 b' names that should work without quoting'
197 <filteredset
197 <filteredset
198 <baseset [7]>>
198 <baseset [7]>>
199 7
199 7
200 $ try -- '-a-b-c-' # complains
200
201 hg: parse error at 7: not a prefix: end
201 names that should be caught by fallback mechanism
202 [255]
202
203 $ log -a-b-c- # succeeds with fallback
203 $ try -- '-a-b-c-'
204 (negate
205 ('symbol', 'a-b-c-'))
206 * set:
207 <baseset [4]>
208 4
209 $ log -a-b-c-
204 4
210 4
205
211
206 $ try -- -a-b-c--a # complains
212 $ try -- -a-b-c--a # complains
General Comments 0
You need to be logged in to leave comments. Login now