svnnotify html颜色差异

时间:2016-06-09 09:15:35

标签: html bash svn diff

我在提交时使用svnnotify发送通知电子邮件。我的回购邮件hooks/post-commit上有以下脚本:

#!/bin/sh

REPOS="$1"
REV="$2"
for address in $(/bin/cat /var/svn/teachbyapp/hooks/addressee.list)
do
  /usr/local/bin/svnnotify \
    -r $REV \
    -C \
    -d \
    --diff-encoding utf8 \
    -H HTML::ColorDiff \
    -p $REPOS \
    -t "$address" \
    --from svn@factory.e-levelcom.com
done

它有效,但我得到的是黑色和白色差异(根本没有颜色)。 添加的行加下划线,而删除的行具有删除线格式。没有别的,没有颜色。 我怎样才能得到真正的彩色差异?像this

这样的东西

1 个答案:

答案 0 :(得分:0)

好的我找到了。

感谢this工作

还需要在我的脚本中将private void AccessElements() { TaxoProcess Taxo = new TaxoProcess(); if (Taxo.AccessEntity()) { MessageBox.Show("Succesfully Extracted Data", "Extract Application", MessageBoxButton.OK, MessageBoxImage.Information); } } 选项附加到public bool AccessEntity() { try { bool Status = true; Thread MainThread = Thread.CurrentThread; Thread backgroundThread = new Thread(new ThreadStart(() => { for (int i = 0; i < Entities.Count; i++) { Thread.Sleep(100); Dispatcher.FromThread(MainThread).BeginInvoke(new Action(() => { int PercentageValue = (int)(0.5f + ((100f * i) / Entities.Count)); StaticDataProperties.ProgBar.Value = PercentageValue; })); } })); backgroundThread.Start(); return Status; } catch (Exception ex) { ErrorException = ex.Message; return false; } } 命令