Modify ↓
Opened 9 years ago
Closed 6 years ago
#12177 closed defect (fixed)
Quickjump should list all bookmarks, not only those of current revision
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | plugin - mercurial |
Component: | plugin/mercurial | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Show all bookmarks. |
||
API Changes: | |||
Internal Changes: |
Description
After #10527 and #11995, MercurialRepository.get_quickjump_entries(rev)
lists only bookmarks for current revision. The method should list all bookmarks regardless of value of rev
argument.
Suggestion from comment:5:ticket:11431.
-
tracext/hg/backend.py
diff -r 7be798c48b82 tracext/hg/backend.py
a b 114 114 else: 115 115 from mercurial.scmutil import match 116 116 117 has_bookmarks = None 117 try: 118 from mercurial.bookmarks import listbookmarks 119 except ImportError: 120 try: 121 from hgext.bookmarks import listbookmarks 122 except ImportError: 123 listbookmarks = None 124 has_bookmarks = bool(listbookmarks) 118 125 has_phasestr = None 119 126 120 127 except ImportError, e: … … 152 159 return s 153 160 154 161 def get_bookmarks(ctx): 155 global has_bookmarks156 162 if has_bookmarks: 157 163 return ctx.bookmarks() 158 if has_bookmarks is None: 159 has_bookmarks = hasattr(ctx, 'bookmarks') 160 if has_bookmarks: 161 return get_bookmarks(ctx) 162 return () 164 else: 165 return () 166 167 def get_repo_bookmarks(repo): 168 if has_bookmarks: 169 return listbookmarks(repo) 170 else: 171 return () 163 172 164 173 def get_phasestr(ctx): 165 174 global has_phasestr … … 689 698 yield ((name or nodestr) + taginfo(ctx), '/', nodestr) 690 699 # bookmarks 691 700 bookmarks = [(self.changectx(b), b) 692 for b in get_ bookmarks(self.changectx(rev))]701 for b in get_repo_bookmarks(self.repo)] 693 702 for e in quickjump_entries(bookmarks): 694 703 yield _("Bookmarks"), e[0], e[1], e[2] 695 704 # branches
Attachments (0)
Change History (1)
comment:1 by , 6 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Pushed with test in [55/mercurial-plugin].