Show More
@@ -2548,8 +2548,10 def debugrevlog(ui, repo, file_=None, ** | |||||
2548 | ui.write(('deltas against other : ') + fmt % pcfmt(numother, |
|
2548 | ui.write(('deltas against other : ') + fmt % pcfmt(numother, | |
2549 | numdeltas)) |
|
2549 | numdeltas)) | |
2550 |
|
2550 | |||
2551 |
@command('debugrevspec', |
|
2551 | @command('debugrevspec', | |
2552 | def debugrevspec(ui, repo, expr): |
|
2552 | [('', 'optimize', None, _('print parsed tree after optimizing'))], | |
|
2553 | ('REVSPEC')) | |||
|
2554 | def debugrevspec(ui, repo, expr, **opts): | |||
2553 | """parse and apply a revision specification |
|
2555 | """parse and apply a revision specification | |
2554 |
|
2556 | |||
2555 | Use --verbose to print the parsed tree before and after aliases |
|
2557 | Use --verbose to print the parsed tree before and after aliases | |
@@ -2561,6 +2563,9 def debugrevspec(ui, repo, expr): | |||||
2561 | newtree = revset.findaliases(ui, tree) |
|
2563 | newtree = revset.findaliases(ui, tree) | |
2562 | if newtree != tree: |
|
2564 | if newtree != tree: | |
2563 | ui.note(revset.prettyformat(newtree), "\n") |
|
2565 | ui.note(revset.prettyformat(newtree), "\n") | |
|
2566 | if opts["optimize"]: | |||
|
2567 | weight, optimizedtree = revset.optimize(newtree, True) | |||
|
2568 | ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n") | |||
2564 | func = revset.match(ui, expr) |
|
2569 | func = revset.match(ui, expr) | |
2565 | for c in func(repo, revset.baseset(range(len(repo)))): |
|
2570 | for c in func(repo, revset.baseset(range(len(repo)))): | |
2566 | ui.write("%s\n" % c) |
|
2571 | ui.write("%s\n" % c) |
@@ -250,7 +250,7 Show all commands + options | |||||
250 | debugrebuilddirstate: rev |
|
250 | debugrebuilddirstate: rev | |
251 | debugrename: rev |
|
251 | debugrename: rev | |
252 | debugrevlog: changelog, manifest, dump |
|
252 | debugrevlog: changelog, manifest, dump | |
253 | debugrevspec: |
|
253 | debugrevspec: optimize | |
254 | debugsetparents: |
|
254 | debugsetparents: | |
255 | debugsub: rev |
|
255 | debugsub: rev | |
256 | debugsuccessorssets: |
|
256 | debugsuccessorssets: |
General Comments 0
You need to be logged in to leave comments.
Login now