Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hggtk: refactor markup escape function

Changeset db7973affdc8

Parent 906363e76fc7

by Wagner Bruna

Changes to 7 files · Browse files at db7973affdc8 Showing diff from parent 906363e76fc7 Diff from another changeset...

 
45
46
47
 
48
49
50
 
341
342
343
344
 
345
346
347
 
45
46
47
48
49
50
51
 
342
343
344
 
345
346
347
348
@@ -45,6 +45,7 @@
 _thg_path()    from thgutil import paths, debugthg, hglib, cachethg +from hggtk import gtklib    if debugthg.debug('N'):   debugf = debugthg.debugf @@ -341,7 +342,7 @@
  parents = '\n'.join([short(p.node()) for p in ctx.parents()])   description = ctx.description()   user = ctx.user() - user = gobject.markup_escape_text(user) + user = gtklib.markup_escape_text(user)   tags = ', '.join(ctx.tags())   branch = ctx.branch()  
Change 1 of 1 Show Entire File hggtk/​backout.py Stacked
 
91
92
93
94
 
95
96
97
 
91
92
93
 
94
95
96
97
@@ -91,7 +91,7 @@
  revstr = str(ctx.rev())   summary = ctx.description().replace('\0', '')   summary = summary.split('\n')[0] - escape = gobject.markup_escape_text + escape = gtklib.markup_escape_text   desc = '<b>' + _('rev') + '</b>\t\t: %s\n' % escape(revstr)   desc += '<b>' + _('summary') + '</b>\t: %s\n' % escape(summary[:80])   desc += '<b>' + _('user') + '</b>\t\t: %s\n' % escape(ctx.user())
Change 1 of 1 Show Entire File hggtk/​datamine.py Stacked
 
177
178
179
180
 
181
182
183
 
177
178
179
 
180
181
182
183
@@ -177,7 +177,7 @@
  author = util.shortuser(ctx.user())   summary = ctx.description().replace('\0', '')   summary = toutf(summary.split('\n')[0]) - summary = gobject.markup_escape_text(summary) + summary = gtklib.markup_escape_text(summary)   date = displaytime(ctx.date())   desc = toutf(author+'@'+str(rev)+' '+date+' "') + summary + '"'   author = toutf(author)
Change 1 of 1 Show Entire File hggtk/​gtklib.py Stacked
 
15
16
17
 
 
18
19
20
 
15
16
17
18
19
20
21
22
@@ -15,6 +15,8 @@
   from hggtk import hgtk   +from gobject import markup_escape_text +  def set_tortoise_icon(window, thgicon):   ico = paths.get_tortoise_icon(thgicon)   if ico: window.set_icon_from_file(ico)
 
13
14
15
 
16
17
18
 
120
121
122
123
 
124
125
126
 
13
14
15
16
17
18
19
 
121
122
123
 
124
125
126
127
@@ -13,6 +13,7 @@
 from mercurial import util  from mercurial.hgweb import webutil  from thgutil import hglib +from hggtk import gtklib    # treemodel row enumerated attributes  LINES = 0 @@ -120,7 +121,7 @@
  summary = summary[0:80]   else:   summary = summary.split('\n')[0] - summary = gobject.markup_escape_text(hglib.toutf(summary)) + summary = gtklib.markup_escape_text(hglib.toutf(summary))   node = self.repo.lookup(revid)   tags = self.repo.nodetags(node)   taglist = hglib.toutf(', '.join(tags))
Change 1 of 1 Show Entire File hggtk/​merge.py Stacked
 
100
101
102
103
 
104
105
106
 
100
101
102
 
103
104
105
106
@@ -100,7 +100,7 @@
  revstr = str(ctx.rev())   summary = ctx.description().replace('\0', '')   summary = summary.split('\n')[0] - escape = gobject.markup_escape_text + escape = gtklib.markup_escape_text   desc = '<b>' + _('rev') + '</b>\t\t: %s\n' % escape(revstr)   desc += '<b>' + _('summary') + '</b>\t: %s\n' % escape(summary[:80])   desc += '<b>' + _('user') + '</b>\t\t: %s\n' % escape(ctx.user())
Change 1 of 2 Show Entire File hggtk/​status.py Stacked
 
42
43
44
45
 
46
47
48
 
60
61
62
63
 
64
65
66
 
42
43
44
 
45
46
47
48
 
60
61
62
 
63
64
65
66
@@ -42,7 +42,7 @@
  hunk = ""   lines = text.split('\n')   for line in lines: - line = gobject.markup_escape_text(hglib.toutf(line[:512])) + '\n' + line = gtklib.markup_escape_text(hglib.toutf(line[:512])) + '\n'   if line.startswith('---') or line.startswith('+++'):   hunk += '<span foreground="#000090">%s</span>' % line   elif line.startswith('-'): @@ -60,7 +60,7 @@
  hunk = ""   lines = text.split('\n')   for line in lines: - line = gobject.markup_escape_text(hglib.toutf(line[:512])) + '\n' + line = gtklib.markup_escape_text(hglib.toutf(line[:512])) + '\n'   hunk += line   return hunk