Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

stable changeset: use 'hglib' namespace

Changeset 7b7599d33425

Parent 3a81fb6ac3cb

by Yuki KODAMA

Changes to one file · Browse files at 7b7599d33425 Showing diff from parent 3a81fb6ac3cb Diff from another changeset...

 
15
16
17
18
19
20
21
 
124
125
126
127
 
128
129
130
131
 
132
133
134
135
 
136
137
138
 
168
169
170
171
 
172
173
174
175
176
177
 
178
179
180
 
247
248
249
250
 
251
252
253
 
323
324
325
326
 
327
328
329
330
331
 
332
333
334
 
337
338
339
340
 
341
342
343
 
344
345
346
 
347
348
349
 
718
719
720
721
722
 
 
723
724
725
 
15
16
17
 
18
19
20
 
123
124
125
 
126
127
128
129
 
130
131
132
133
 
134
135
136
137
 
167
168
169
 
170
171
172
173
174
175
 
176
177
178
179
 
246
247
248
 
249
250
251
252
 
322
323
324
 
325
326
327
328
329
 
330
331
332
333
 
336
337
338
 
339
340
341
 
342
343
344
 
345
346
347
348
 
717
718
719
 
 
720
721
722
723
724
@@ -15,7 +15,6 @@
 from mercurial import cmdutil, util, patch, mdiff    from tortoisehg.util.i18n import _ -from tortoisehg.util.hglib import *  from tortoisehg.util import shlib, hglib    from tortoisehg.hgtk import csinfo, gdialog, gtklib, hgcmd, statusbar @@ -124,15 +123,15 @@
  for f in modified:   if f in pats:   selrow = len(self._filelist) - self._filelist.append(('M', toutf(f), f)) + self._filelist.append(('M', hglib.toutf(f), f))   for f in added:   if f in pats:   selrow = len(self._filelist) - self._filelist.append(('A', toutf(f), f)) + self._filelist.append(('A', hglib.toutf(f), f))   for f in removed:   if f in pats:   selrow = len(self._filelist) - self._filelist.append(('R', toutf(f), f)) + self._filelist.append(('R', hglib.toutf(f), f))   self.curnodes = (parent, ctx.node())   if selrow is not None:   self._filesel.select_path((selrow,)) @@ -168,13 +167,13 @@
  if state == 'git':   for m in values:   f = m.path - self._filelist.append((map[m.op], toutf(f), f)) + self._filelist.append((map[m.op], hglib.toutf(f), f))   files.append(f)   elif state == 'file':   type, path = get_path(values[0], values[1])   self.curphunks[path] = hunks = ['diff']   if path not in files: - self._filelist.append((type, toutf(path), path)) + self._filelist.append((type, hglib.toutf(path), path))   files.append(path)   elif state == 'hunk':   hunks.extend([l.rstrip('\r\n') for l in values.hunk]) @@ -247,7 +246,7 @@
  fctx = self.repo[rev].filectx(wfile)   except LookupError:   fctx = None - if fctx and fctx.size() > getmaxdiffsize(self.ui): + if fctx and fctx.size() > hglib.getmaxdiffsize(self.ui):   lines = ['diff',   _(' %s is larger than the specified max diff size') % wfile]   else: @@ -323,12 +322,12 @@
  rem += 1   outlines = []   tags = [] - txt = toutf('=== (+%d,-%d) %s ===\n' % (add, rem, fname)) + txt = hglib.toutf('=== (+%d,-%d) %s ===\n' % (add, rem, fname))   addtag( 'greybg', offset, len(txt) )   outlines.append(txt)   offset += len(txt.decode('utf-8'))   for l1 in difflines[1:]: - l = toutf(l1) + l = hglib.toutf(l1)   if l.startswith('+++'):   continue   if l.startswith('---'): @@ -337,13 +336,13 @@
  tag = 'blue'   elif l.startswith('+'):   tag = 'green' - l = diffexpand(l) + l = hglib.diffexpand(l)   elif l.startswith('-'):   tag = 'red' - l = diffexpand(l) + l = hglib.diffexpand(l)   else:   tag = 'black' - l = diffexpand(l) + l = hglib.diffexpand(l)   l = l+"\n"   length = len(l.decode('utf-8'))   addtag( tag, offset, length ) @@ -718,8 +717,8 @@
  os.remove(result)     q = Queue.Queue() - hgcmd_toq(q, 'cat', '--rev', - str(self.currev), '--output', fromutf(result), self.curfile) + hglib.hgcmd_toq(q, 'cat', '--rev', + str(self.currev), '--output', hglib.fromutf(result), self.curfile)     def diff_to_local(self, menuitem):   if not self.curfile: