[QBZR][Merge] Add unidiff format to diff dialog
Alexander Belchenko
bialix at ukr.net
Tue Oct 16 09:06:13 BST 2007
Goffredo Baroncelli пишет:
> Ok, I update my patch:
> - remove the border (asked by M.Pool)
> - correct the error in the font height calculation, now I use html to do the
> highlight (Alexander Belchenko)
> - remove the automatic word-wrap (Alexander Belchenko)
>
> Now the highlight style is coded as HTML style, so it is easier to change (see
> function html_unidiff()):
> Every unidiff source line is translated as
>
> <div style="blablabla">unidiff_line </div>
>
> Where "blablabla" is the style of the line, on the basis of the following
> sequence:
>
> '---': 'background-color:#c5e3f7; color:black',
> '+++': 'background-color:#c5e3f7; color:black',
> '-': 'background-color:#FFDDDD; color:black',
> '+': 'background-color:#DDFFDD; color:black',
> '@': 'background-color:#c5e3f7; color:black',
> '=': 'background-color:#c5e3f7; color:black',
> defaultstyle = 'background-color:#ffffff; color=black',
It's looks better but I disagree with this changes:
@@ -272,7 +286,7 @@
self.append(diff)
for path, file_id, kind in delta.added:
- diff = FileDiff(_('added'), path)
+ diff = FileDiff('added', path)
diff.kind = kind
diff.old_date = self._date(old_tree, file_id, path, 0)
diff.new_date = self._date(new_tree, file_id, path)
@@ -284,7 +298,7 @@
self.append(diff)
for old_path, new_path, file_id, kind, text_modified,
meta_modified in delta.renamed:
- diff = FileDiff(_('renamed'), u'%s \u2192 %s' % (old_path,
new_path))
+ diff = FileDiff('renamed', u'%s \u2192 %s' % (old_path,
new_path))
diff.kind = kind
diff.old_date = self._date(old_tree, file_id, old_path)
diff.new_date = self._date(new_tree, file_id, new_path)
@@ -297,7 +311,7 @@
self.append(diff)
for path, file_id, kind, text_modified, meta_modified in
delta.modified:
- diff = FileDiff(_('modified'), path)
+ diff = FileDiff('modified', path)
diff.kind = kind
diff.old_date = self._date(old_tree, file_id, path)
diff.new_date = self._date(new_tree, file_id, path)
Don't revert my i18n stuff, please.
More information about the bazaar
mailing list