debuglabelcomplete: compute active branch heads correctly

The previous computation was simply wrong.
This commit is contained in:
Bryan O'Sullivan 2013-04-09 09:40:40 -07:00
parent d7eb3b4a51
commit 738dd167db
2 changed files with 7 additions and 1 deletions

View File

@ -2078,8 +2078,12 @@ def debuglabelcomplete(ui, repo, *args):
labels = set()
labels.update(t[0] for t in repo.tagslist())
labels.update(repo[n].branch() for n in repo.heads())
labels.update(repo._bookmarks.keys())
for heads in repo.branchmap().itervalues():
for h in heads:
ctx = repo[h]
if not ctx.closesbranch():
labels.add(ctx.branch())
completions = set()
if not args:
args = ['']

View File

@ -329,8 +329,10 @@ Test debuglabelcomplete
Fum
default
fee
fie
fo
tip
$ hg debuglabelcomplete f
fee
fie
fo