[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone.colored-diff: c9db0d3f9113a5
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone.colored-diff: c9db0d3f9113a5f4bb70001de76a68d035839c2d |
Date: |
Wed, 17 Aug 2011 11:42:48 +0200 (CEST) |
revision: c9db0d3f9113a5f4bb70001de76a68d035839c2d
date: 2011-04-13T22:05:53
author: Richard Hopkins <address@hidden>
branch: net.venge.monotone.colored-diff
changelog:
Applied recent puporse::important changes onto last revision before Win32
changes
32dadf9c91dc9ee0b572b175c113fd32f119504e, where the changes came from has
come into a stumbling block with supporting ANSI + Win32 output colorizing
the graphing code. So we are applying just the new purpose onto the last
good revision before Win32 to start a new line of development with a
different strategy for colorizing.
manifest:
format_version "1"
new_manifest [d70235b46e6aa54df3cd1d025cf2b8c7ab951569]
old_revision [90a61d2166a6c30e950a0d02f590b83ca9b6b39d]
patch "src/cmd_ws_commit.cc"
from [b22c4c8871fe38e55da487318326755c699d4873]
to [11fb8787d71d794012403d8f5b3aa1413d08f756]
patch "src/colorizer.cc"
from [96964884a83e4d7d638c146821a554d033f396eb]
to [75bf058d81203a6a336bf78c9f17e93a9ec0bd9b]
patch "src/colorizer.hh"
from [eb3d0e3dad8d447e270e0c6264bf1a4ea139013f]
to [d297c5407c6fa949be640656738573dc75ef9f2b]
patch "src/std_hooks.lua"
from [c8cd84c99c2b34b1ed32a0c5b58c9ab415f1be48]
to [74778bdf4686d30e64c75133c6dfba26e534db5d]
============================================================
--- src/std_hooks.lua c8cd84c99c2b34b1ed32a0c5b58c9ab415f1be48
+++ src/std_hooks.lua 74778bdf4686d30e64c75133c6dfba26e534db5d
@@ -1561,6 +1561,7 @@ function get_output_color(purpose)
change = { fg = "blue", bg = "", style = "" },
comment = { fg = "yellow", bg = "", style = "" },
encloser = { fg = "magenta", bg = "", style = "" },
+ important = { fg = "white", bg = "red", style = "" },
log_revision = { fg = "", bg = "", style = "bold" },
remove = { fg = "red", bg = "", style = "" },
rename = { fg = "yellow", bg = "", style = "" },
============================================================
--- src/cmd_ws_commit.cc b22c4c8871fe38e55da487318326755c699d4873
+++ src/cmd_ws_commit.cc 11fb8787d71d794012403d8f5b3aa1413d08f756
@@ -984,11 +984,26 @@ CMD(status, "status", "", CMD_REF(inform
old_branches.find(app.opts.branch) == old_branches.end())
{
cout << string(70, '-') << '\n'
- << _("*** THIS REVISION WILL CREATE A NEW BRANCH ***") << "\n\n";
+ << color.colorize(_("*** THIS REVISION WILL CREATE A NEW BRANCH ***"),
+ colorizer::important)
+ << "\n\n";
for (set<branch_name>::const_iterator i = old_branches.begin();
i != old_branches.end(); ++i)
- cout << _("Old Branch: ") << *i << '\n';
- cout << _("New Branch: ") << app.opts.branch << "\n\n";
+ {
+ std::ostringstream old_name;
+ old_name << *i;
+
+ cout << color.colorize(_("Old Branch: "), colorizer::remove)
+ << color.colorize(old_name.str(), colorizer::remove)
+ << '\n';
+ }
+
+ std::ostringstream new_name;
+ new_name << app.opts.branch;
+
+ cout << color.colorize(_("New Branch: "), colorizer::add)
+ << color.colorize(new_name.str(), colorizer::add)
+ << "\n\n";
}
set<revision_id> heads;
project.get_branch_heads(app.opts.branch, heads, false);
@@ -999,7 +1014,9 @@ CMD(status, "status", "", CMD_REF(inform
{
if (heads.find(edge_old_revision(e)) == heads.end())
{
- cout << _("*** THIS REVISION WILL CREATE DIVERGENCE ***") << "\n\n";
+ cout << color.colorize(_("*** THIS REVISION WILL CREATE DIVERGENCE ***"),
+ colorizer::important)
+ << "\n\n";
break;
}
}
============================================================
--- src/colorizer.cc 96964884a83e4d7d638c146821a554d033f396eb
+++ src/colorizer.cc 75bf058d81203a6a336bf78c9f17e93a9ec0bd9b
@@ -33,6 +33,8 @@ string colorizer::purpose_to_name(colori
return "comment";
case encloser:
return "encloser";
+ case important:
+ return "important";
case log_revision:
return "log_revision";
case remove:
@@ -148,6 +150,7 @@ colorizer::colorizer(bool enable, lua_ho
colormap.insert(map_output_color(change));
colormap.insert(map_output_color(comment));
colormap.insert(map_output_color(encloser));
+ colormap.insert(map_output_color(important));
colormap.insert(map_output_color(log_revision));
colormap.insert(map_output_color(remove));
colormap.insert(map_output_color(rename));
============================================================
--- src/colorizer.hh eb3d0e3dad8d447e270e0c6264bf1a4ea139013f
+++ src/colorizer.hh d297c5407c6fa949be640656738573dc75ef9f2b
@@ -24,6 +24,7 @@ struct colorizer {
change,
comment,
encloser,
+ important,
log_revision,
remove,
rename,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone.colored-diff: c9db0d3f9113a5f4bb70001de76a68d035839c2d,
code <=