equal
deleted
inserted
replaced
2076 def debuglabelcomplete(ui, repo, *args): |
2076 def debuglabelcomplete(ui, repo, *args): |
2077 '''complete "labels" - tags, open branch names, bookmark names''' |
2077 '''complete "labels" - tags, open branch names, bookmark names''' |
2078 |
2078 |
2079 labels = set() |
2079 labels = set() |
2080 labels.update(t[0] for t in repo.tagslist()) |
2080 labels.update(t[0] for t in repo.tagslist()) |
2081 labels.update(repo[n].branch() for n in repo.heads()) |
|
2082 labels.update(repo._bookmarks.keys()) |
2081 labels.update(repo._bookmarks.keys()) |
|
2082 for heads in repo.branchmap().itervalues(): |
|
2083 for h in heads: |
|
2084 ctx = repo[h] |
|
2085 if not ctx.closesbranch(): |
|
2086 labels.add(ctx.branch()) |
2083 completions = set() |
2087 completions = set() |
2084 if not args: |
2088 if not args: |
2085 args = [''] |
2089 args = [''] |
2086 for a in args: |
2090 for a in args: |
2087 completions.update(l for l in labels if l.startswith(a)) |
2091 completions.update(l for l in labels if l.startswith(a)) |