Wed, 24 Feb 2016 14:24:00 +0000 chg: extract gethgcmd logic to a function
Jun Wu <quark@fb.com> [Wed, 24 Feb 2016 14:24:00 +0000] rev 28237
chg: extract gethgcmd logic to a function gethgcmd is to get original hg (not chg) binary name. This patch extracts the logic from execcmdserver to make it available for the following patch.
Wed, 24 Feb 2016 23:00:33 +0900 destutil: use cached branch information instead of query for efficiency
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 24 Feb 2016 23:00:33 +0900] rev 28236
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()".
(0) -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 +3000 +10000 tip