Edgewall Software
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

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  
    689689                closed_branches[ctx] = b
    690690            else:
    691691                branches[ctx] = b
    692         # map node to tag names
    693         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 ''
    703692        def quickjump_entries(ctx_name_pairs):
    704693            for ctx, name in sorted(ctx_name_pairs, reverse=True,
    705694                                    key=lambda (ctx, name): ctx.rev()):
    706695                nodestr = self._display(ctx)
    707                 yield ((name or nodestr) + taginfo(ctx), '/', nodestr)
     696                yield ((name or nodestr), '/', nodestr)
    708697        # bookmarks
    709698        bookmarks = [(self.changectx(b), b)
    710699                     for b in get_repo_bookmarks(self.repo)]
     
    721710        for e in quickjump_entries(interesting_heads):
    722711            yield _("Extra heads"), e[0], e[1], e[2]
    723712        # tags
    724         for t, n in reversed(tagslist):
     713        for t, n in reversed(self.repo.tagslist()):
    725714            try:
    726                 yield (_("Tags"), ', '.join(tags[n]), '/',
     715                yield (_("Tags"), self.to_u(t), '/',
    727716                       self._display(self.repo[n]))
    728717            except (KeyError, RepoLookupError):
    729718                pass

Is it important to see which branch has the (tip) tag?

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.