Mercurial > hg
comparison mercurial/commands.py @ 28629:d6f8a1535224
debugrevspec: show expanded/concatenated states before printing trees
The debugrevspec command prints at most 4 parsed trees. It wasn't easy to
tell which tree belongs to which state.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 Mar 2016 19:01:12 +0900 |
parents | 6433da9c96a9 |
children | 3ceac01bc29f |
comparison
equal
deleted
inserted
replaced
28628:ed1d90f6e921 | 28629:d6f8a1535224 |
---|---|
3461 if ui.verbose: | 3461 if ui.verbose: |
3462 tree = revset.parse(expr, lookup=repo.__contains__) | 3462 tree = revset.parse(expr, lookup=repo.__contains__) |
3463 ui.note(revset.prettyformat(tree), "\n") | 3463 ui.note(revset.prettyformat(tree), "\n") |
3464 newtree = revset.findaliases(ui, tree) | 3464 newtree = revset.findaliases(ui, tree) |
3465 if newtree != tree: | 3465 if newtree != tree: |
3466 ui.note(revset.prettyformat(newtree), "\n") | 3466 ui.note("* expanded:\n", revset.prettyformat(newtree), "\n") |
3467 tree = newtree | 3467 tree = newtree |
3468 newtree = revset.foldconcat(tree) | 3468 newtree = revset.foldconcat(tree) |
3469 if newtree != tree: | 3469 if newtree != tree: |
3470 ui.note(revset.prettyformat(newtree), "\n") | 3470 ui.note("* concatenated:\n", revset.prettyformat(newtree), "\n") |
3471 if opts["optimize"]: | 3471 if opts["optimize"]: |
3472 weight, optimizedtree = revset.optimize(newtree, True) | 3472 weight, optimizedtree = revset.optimize(newtree, True) |
3473 ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n") | 3473 ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n") |
3474 func = revset.match(ui, expr, repo) | 3474 func = revset.match(ui, expr, repo) |
3475 revs = func(repo) | 3475 revs = func(repo) |