Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 29905:371c2a39eead
revset: make analyze() a separate step from optimize()
This will allow us to evaluate unoptimized tree and compare the result with
optimized one.
The private _analyze() function isn't renamed since I'll add more parameters
to it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 21 Aug 2016 11:29:57 +0900 |
parents | 4d1e6f91f1c7 |
children | b3ec902b2f3c |
comparison
equal
deleted
inserted
replaced
29904:e4b4168a4f1c | 29905:371c2a39eead |
---|---|
3528 tree = newtree | 3528 tree = newtree |
3529 newtree = revset.foldconcat(tree) | 3529 newtree = revset.foldconcat(tree) |
3530 if newtree != tree: | 3530 if newtree != tree: |
3531 ui.note(("* concatenated:\n"), revset.prettyformat(newtree), "\n") | 3531 ui.note(("* concatenated:\n"), revset.prettyformat(newtree), "\n") |
3532 if opts["optimize"]: | 3532 if opts["optimize"]: |
3533 newtree = revset.analyze(newtree) | |
3533 optimizedtree = revset.optimize(newtree) | 3534 optimizedtree = revset.optimize(newtree) |
3534 ui.note(("* optimized:\n"), | 3535 ui.note(("* optimized:\n"), |
3535 revset.prettyformat(optimizedtree), "\n") | 3536 revset.prettyformat(optimizedtree), "\n") |
3536 func = revset.match(ui, expr, repo) | 3537 func = revset.match(ui, expr, repo) |
3537 revs = func(repo) | 3538 revs = func(repo) |