equal
deleted
inserted
replaced
2141 '''complete "labels" - tags, open branch names, bookmark names''' |
2141 '''complete "labels" - tags, open branch names, bookmark names''' |
2142 |
2142 |
2143 labels = set() |
2143 labels = set() |
2144 labels.update(t[0] for t in repo.tagslist()) |
2144 labels.update(t[0] for t in repo.tagslist()) |
2145 labels.update(repo._bookmarks.keys()) |
2145 labels.update(repo._bookmarks.keys()) |
2146 for heads in repo.branchmap().itervalues(): |
2146 labels.update(tag for (tag, heads, tip, closed) |
2147 for h in heads: |
2147 in repo.branchmap().iterbranches() if not closed) |
2148 ctx = repo[h] |
|
2149 if not ctx.closesbranch(): |
|
2150 labels.add(ctx.branch()) |
|
2151 completions = set() |
2148 completions = set() |
2152 if not args: |
2149 if not args: |
2153 args = [''] |
2150 args = [''] |
2154 for a in args: |
2151 for a in args: |
2155 completions.update(l for l in labels if l.startswith(a)) |
2152 completions.update(l for l in labels if l.startswith(a)) |