comparison mercurial/commands.py @ 24114:fafd9a1284cf

revset: make match function initiate query from full set by default This change is intended to avoid exposing the implementation detail to callers. I'm going to extend fullreposet to support "null" revision, so these mfunc calls will have to use fullreposet() instead of spanset().
author Yuya Nishihara <yuya@tcha.org>
date Mon, 02 Feb 2015 22:21:07 +0900
parents becfecaf9087
children 18af6ebd4001
comparison
equal deleted inserted replaced
24113:b08af8f0ac01 24114:fafd9a1284cf
2883 ui.note(revset.prettyformat(newtree), "\n") 2883 ui.note(revset.prettyformat(newtree), "\n")
2884 if opts["optimize"]: 2884 if opts["optimize"]:
2885 weight, optimizedtree = revset.optimize(newtree, True) 2885 weight, optimizedtree = revset.optimize(newtree, True)
2886 ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n") 2886 ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n")
2887 func = revset.match(ui, expr) 2887 func = revset.match(ui, expr)
2888 for c in func(repo, revset.spanset(repo)): 2888 for c in func(repo):
2889 ui.write("%s\n" % c) 2889 ui.write("%s\n" % c)
2890 2890
2891 @command('debugsetparents', [], _('REV1 [REV2]')) 2891 @command('debugsetparents', [], _('REV1 [REV2]'))
2892 def debugsetparents(ui, repo, rev1, rev2=None): 2892 def debugsetparents(ui, repo, rev1, rev2=None):
2893 """manually set the parents of the current working directory 2893 """manually set the parents of the current working directory