Modify ↓
Opened 6 years ago
#13050 new defect
Quickjump dropdown overflows due to Mercurial tags
Reported by: | Peter Suter | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | plugin - mercurial |
Component: | plugin/mercurial | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
- SVN get_quickjump_entries just lists each tag path.
- Git get_quickjump_entries just lists each tag name.
- Mercurial get_quickjump_entries collects all tags of a revision and joins them together.
When one Mercurial revision has many tags this leads to a huge, overflowing quickjump menu. Can we just drop this?
-
tracext/hg/backend.py
diff -r a821499e945c tracext/hg/backend.py
a b 689 689 closed_branches[ctx] = b 690 690 else: 691 691 branches[ctx] = b 692 # map node to tag names693 tags = {}694 tagslist = self.repo.tagslist()695 for tag, n in tagslist:696 tags.setdefault(n, []).append(self.to_u(tag))697 def taginfo(ctx):698 t = tags.get(ctx.node())699 if t:700 return ' (%s)' % ', '.join(t)701 else:702 return ''703 692 def quickjump_entries(ctx_name_pairs): 704 693 for ctx, name in sorted(ctx_name_pairs, reverse=True, 705 694 key=lambda (ctx, name): ctx.rev()): 706 695 nodestr = self._display(ctx) 707 yield ((name or nodestr) + taginfo(ctx), '/', nodestr)696 yield ((name or nodestr), '/', nodestr) 708 697 # bookmarks 709 698 bookmarks = [(self.changectx(b), b) 710 699 for b in get_repo_bookmarks(self.repo)] … … 721 710 for e in quickjump_entries(interesting_heads): 722 711 yield _("Extra heads"), e[0], e[1], e[2] 723 712 # tags 724 for t, n in reversed( tagslist):713 for t, n in reversed(self.repo.tagslist()): 725 714 try: 726 yield (_("Tags"), ', '.join(tags[n]), '/',715 yield (_("Tags"), self.to_u(t), '/', 727 716 self._display(self.repo[n])) 728 717 except (KeyError, RepoLookupError): 729 718 pass
Is it important to see which branch has the (tip)
tag?
Attachments (0)
Note:
See TracTickets
for help on using tickets.