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

rename: show UTF-8 versions of filenames

fixes #8

Changeset de3c2040b03c

Parent 3cdff45f0b27

by Steve Borho

Changes to one file · Browse files at de3c2040b03c Showing diff from parent 3cdff45f0b27 Diff from another changeset...

Change 1 of 8 Show Entire File hggtk/​rename.py Stacked
 
58
59
60
61
 
62
63
64
65
66
 
67
68
69
 
86
87
88
89
 
90
91
92
 
96
97
98
99
 
100
101
102
103
104
105
106
 
107
108
109
110
111
112
113
 
114
115
116
 
210
211
212
213
 
 
214
215
216
 
269
270
271
272
 
273
274
275
276
 
 
277
278
279
 
294
295
296
297
 
298
299
300
 
306
307
308
309
310
 
 
311
312
313
 
336
337
338
339
 
340
341
342
 
58
59
60
 
61
62
63
64
65
 
66
67
68
69
 
86
87
88
 
89
90
91
92
 
96
97
98
 
99
100
101
102
103
104
105
 
106
107
108
109
110
111
112
 
113
114
115
116
 
210
211
212
 
213
214
215
216
217
 
270
271
272
 
273
274
275
276
 
277
278
279
280
281
 
296
297
298
 
299
300
301
302
 
308
309
310
 
 
311
312
313
314
315
 
338
339
340
 
341
342
343
344
@@ -58,12 +58,12 @@
  topvbox = gtk.VBox()   topvbox.pack_start(frame, False, False, 2)   - unkmodel = gtk.ListStore(str) + unkmodel = gtk.ListStore(str, str)   unknowntree = gtk.TreeView(unkmodel)   unknowntree.get_selection().set_mode(gtk.SELECTION_MULTIPLE)   cell = gtk.CellRendererText()   cell.set_property("ellipsize", pango.ELLIPSIZE_START) - col = gtk.TreeViewColumn('File', cell, text=0) + col = gtk.TreeViewColumn('File', cell, text=1)   unknowntree.append_column(col)   unknowntree.set_enable_search(True)   unknowntree.set_headers_visible(False) @@ -86,7 +86,7 @@
  unknownframe.add(vbox)     # source, dest, percent match, sensitive - cmodel = gtk.ListStore(str, str, str, bool) + cmodel = gtk.ListStore(str, str, str, str, str, bool)   ctree = gtk.TreeView(cmodel)   ctree.set_rules_hint(True)   ctree.set_reorderable(False) @@ -96,21 +96,21 @@
  cell = gtk.CellRendererText()   cell.set_property("width-chars", 30)   cell.set_property("ellipsize", pango.ELLIPSIZE_START) - col = gtk.TreeViewColumn('Source', cell, text=0, sensitive=3) + col = gtk.TreeViewColumn('Source', cell, text=1, sensitive=5)   col.set_resizable(True)   ctree.append_column(col)     cell = gtk.CellRendererText()   cell.set_property("width-chars", 30)   cell.set_property("ellipsize", pango.ELLIPSIZE_START) - col = gtk.TreeViewColumn('Dest', cell, text=1, sensitive=3) + col = gtk.TreeViewColumn('Dest', cell, text=3, sensitive=5)   col.set_resizable(True)   ctree.append_column(col)     cell = gtk.CellRendererText()   cell.set_property("width-chars", 5)   cell.set_property("ellipsize", pango.ELLIPSIZE_NONE) - col = gtk.TreeViewColumn('%', cell, text=2, sensitive=3) + col = gtk.TreeViewColumn('%', cell, text=4, sensitive=5)   col.set_resizable(True)   ctree.append_column(col)   @@ -210,7 +210,8 @@
    def unknown_wait(self, thread, q, unkmodel):   while q.qsize(): - unkmodel.append( [q.get(0)] ) + wfile = q.get(0) + unkmodel.append( [wfile, toutf(wfile)] )   return thread.isAlive()     def save_settings(self, w, event, settings, hpaned, vpaned, adjustment): @@ -269,11 +270,12 @@
  simularity = 1.0   gen = findmoves   for old, new, score in gen(repo, tgts, srcs, simularity): - q.put( [old, new, '%d%%' % (score*100), True] ) + q.put( [old, new, '%d%%' % (score*100)] )     def search_wait(self, thread, q, cmodel, stbar):   while q.qsize(): - cmodel.append( q.get(0) ) + source, dest, sim = q.get(0) + cmodel.append( [source, toutf(source), dest, toutf(dest), sim, True] )   if thread.isAlive():   return True   else: @@ -294,7 +296,7 @@
  cmodel, paths = ctree.get_selection().get_selected_rows()   for path in paths:   row = cmodel[path] - src, dest, percent, sensitive = row + src, usrc, dest, udest, percent, sensitive = row   if not sensitive:   continue   if not os.path.exists(repo.wjoin(src)): @@ -306,8 +308,8 @@
  self.notify_func()   # Mark all rows with this target file as non-sensitive   for row in cmodel: - if row[1] == dest: - row[3] = False + if row[2] == dest: + row[5] = False   self.refresh(unktree.get_model())     def candidate_row_act(self, ctree, path, column, unktree, stbar): @@ -336,7 +338,7 @@
  bufiter = buf.get_start_iter()   for path in paths:   row = model[path] - src, dest, percent, sensitive = row + src, usrc, dest, udest, percent, sensitive = row   if not sensitive:   continue   ctx = repo['.']