##// END OF EJS Templates
destutil: use cached branch information instead of query for efficiency...
destutil: use cached branch information instead of query for efficiency Before this patch, calculation of "the tipmost branch head on current branch" uses revset query "max(.::(head() and branch(BRANCH)))", but this isn't efficiency, because: - head() predicate lists up heads on all branches, but - branch() predicate eliminates heads on other branches In addition to it, without "literal:" prefix for branch name, branch(BRANCH) tries to (1) look up BRANCH in "repo.branchmap()" and (2) look up BRANCH as symbol name again, if there is no branch matching against BRANCH. The latter looking up is obviously redundant. This patch uses repo.branchheads(closed=True) to get all branch heads on specified branch instead of "head() and branch(BRANCH)" revset query part. This patch also makes catching RepoLookupError meaningless, because it is only raised by revset predicate "branch()". But "currentbranch in repo.branchmap()" can detect whether currentbranch actually exists or not. Therefore, this patch replaces try/except for RepoLookupError by if/else for "currentbranch in repo.branchmap()".
FUJIWARA Katsunori -
r28236:e333cea7 default
Show More
Name Size Modified Last Commit Author
/ mercurial / help
internals
common.txt Loading ...
config.txt Loading ...
dates.txt Loading ...
diffs.txt Loading ...
environment.txt Loading ...
extensions.txt Loading ...
filesets.txt Loading ...
glossary.txt Loading ...
hg.1.txt Loading ...
hgignore.5.txt Loading ...
hgignore.txt Loading ...
hgrc.5.txt Loading ...
hgweb.txt Loading ...
merge-tools.txt Loading ...
multirevs.txt Loading ...
patterns.txt Loading ...
phases.txt Loading ...
revisions.txt Loading ...
revsets.txt Loading ...
scripting.txt Loading ...
subrepos.txt Loading ...
templates.txt Loading ...
urls.txt Loading ...