Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7, 0.7.1, and 0.7.2

hgignore: use UTF-8 when displaying filenames and text

fixes #8

Changeset 0afae2efd477

Parent 80245f51155e

by Steve Borho

Changes to one file · Browse files at 0afae2efd477 Showing diff from parent 80245f51155e Diff from another changeset...

Change 1 of 6 Show Entire File hggtk/​hgignore.py Stacked
 
8
9
10
 
11
12
13
 
34
35
36
37
 
38
39
40
 
85
86
87
88
 
89
90
91
 
125
126
127
128
 
129
130
131
 
155
156
157
158
 
159
160
161
 
166
167
168
169
 
170
171
172
 
8
9
10
11
12
13
14
 
35
36
37
 
38
39
40
41
 
86
87
88
 
89
90
91
92
 
126
127
128
 
129
130
131
132
 
156
157
158
 
159
160
161
162
 
167
168
169
 
170
171
172
173
@@ -8,6 +8,7 @@
 import gtk  from dialog import *  from shlib import shell_notify +from hglib import fromutf, toutf  from mercurial import hg, ui, match    class HgIgnoreDialog(gtk.Window): @@ -34,7 +35,7 @@
  hbox.pack_start(glob_button, False, False, 4)   glob_button.connect('clicked', self.add_glob, glob_entry)   glob_entry.connect('activate', self.add_glob, glob_entry) - glob_entry.set_text(fileglob) + glob_entry.set_text(toutf(fileglob))   self.glob_entry = glob_entry   mainvbox.pack_start(hbox, False, False)   @@ -85,7 +86,7 @@
  scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)   scrolledwindow.set_border_width(4)   scrolledwindow.add(unknowntree) - model = gtk.ListStore(str) + model = gtk.ListStore(str, str)   unknowntree.set_model(model)   unknowntree.set_headers_visible(False)   self.unkmodel = model @@ -125,7 +126,7 @@
  self.glob_entry.set_text(model[paths][0])     def add_glob(self, widget, glob_entry): - newglob = glob_entry.get_text() + newglob = fromutf(glob_entry.get_text())   self.ignorelines.append('glob:' + newglob)   self.write_ignore_lines()   self.refresh() @@ -155,7 +156,7 @@
  deleted, unknown, ignored, clean) = changes   self.unkmodel.clear()   for u in unknown: - self.unkmodel.append([u]) + self.unkmodel.append([toutf(u), u])   try:   l = open(repo.wjoin('.hgignore'), 'rb').readlines()   self.doseoln = l[0].endswith('\r\n') @@ -166,7 +167,7 @@
  model = gtk.ListStore(str)   self.ignorelines = []   for line in l: - model.append([line.strip()]) + model.append([toutf(line.strip())])   self.ignorelines.append(line.strip())   self.pattree.set_model(model)   self.repo = repo