Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

stable history: remove unneeded encoding changes of tag names

getlivebranch() always returns strings encoded in UTF-8.
This stems from repo.branchtags().keys() returns tag names
encoded in UTF-8.

Refs #919

Changeset 9f683dba8556

Parent 84af109559ef

by Yuki KODAMA

Changes to 2 files · Browse files at 9f683dba8556 Showing diff from parent 84af109559ef Diff from another changeset...

 
86
87
88
89
 
90
91
92
 
273
274
275
276
277
278
279
 
 
 
 
280
281
282
 
86
87
88
 
89
90
91
92
 
273
274
275
 
 
 
 
276
277
278
279
280
281
282
@@ -86,7 +86,7 @@
  self.branchcombo = gtk.combo_box_new_text()   self.branchcombo.append_text(_('Branches...'))   for name in branch_names: - self.branchcombo.append_text(hglib.toutf(name)) + self.branchcombo.append_text(name)   self.branchcombo.set_active(0)   self.append_widget(self.branchcombo, padding=0)   @@ -273,10 +273,10 @@
  if len(lb) > 1 or (lb and lb[0] != 'default'):   navi_b = []   for name in lb[:10]: - bname = hglib.toutf(name) - navi_b.append(dict(text=bname, func=navigate, args=[name])) - filter_b.append(dict(text=bname, name='@' + bname, - func=self.filter_handler, args=['branch', bname], + lname = hglib.fromutf(name) + navi_b.append(dict(text=name, func=navigate, args=[lname])) + filter_b.append(dict(text=name, name='@' + name, + func=self.filter_handler, args=['branch', name],   asradio=True, rg='all'))   if len(navi_b) > 0:   navi_menu.append(dict(text='----'))
 
95
96
97
 
98
99
100
 
103
104
105
 
106
107
108
 
109
110
111
 
95
96
97
98
99
100
101
 
104
105
106
107
108
109
 
110
111
112
113
@@ -95,6 +95,7 @@
   _deadbranch = None  def getdeadbranch(ui): + '''return a list of dead branch names in UTF-8'''   global _deadbranch   if _deadbranch is None:   db = toutf(ui.config('tortoisehg', 'deadbranch', '')) @@ -103,9 +104,10 @@
  return _deadbranch    def getlivebranch(repo): + '''return a list of live branch names in UTF-8'''   lives = []   deads = getdeadbranch(repo.ui) - for branch in repo.branchtags().keys(): + for branch in repo.branchtags().keys(): # encoded in UTF-8   if branch not in deads:   lives.append(branch)   return lives