Compare commits
2 commits
8e52486e87
...
9d736c5e97
Author | SHA1 | Date | |
---|---|---|---|
9d736c5e97 | |||
e0391d6dfb |
2 changed files with 5 additions and 3 deletions
|
@ -9,8 +9,8 @@ use crate::{
|
||||||
|
|
||||||
static OKAY: Color = Color::Green;
|
static OKAY: Color = Color::Green;
|
||||||
static PREP: Color = Color::Gray;
|
static PREP: Color = Color::Gray;
|
||||||
static ACTING: Color = Color::Yellow;
|
static ACTING: Color = Color::LightBlue;
|
||||||
static WARN: Color = Color::LightYellow;
|
static WARN: Color = Color::Red;
|
||||||
|
|
||||||
impl Handler<ServerUpdate> for Tui {
|
impl Handler<ServerUpdate> for Tui {
|
||||||
type Result = ();
|
type Result = ();
|
||||||
|
|
|
@ -53,7 +53,7 @@ lazy_static::lazy_static! {
|
||||||
static ref BRANCHES: Regex =
|
static ref BRANCHES: Regex =
|
||||||
#[allow(clippy::unwrap_used)]
|
#[allow(clippy::unwrap_used)]
|
||||||
Regex::new(
|
Regex::new(
|
||||||
r"origin\/(?<branch>.*?)[,$]",
|
r"origin\/(?<branch>[^,]+)",
|
||||||
).unwrap();
|
).unwrap();
|
||||||
}
|
}
|
||||||
impl From<LogLine> for Line<'_> {
|
impl From<LogLine> for Line<'_> {
|
||||||
|
@ -62,6 +62,7 @@ impl From<LogLine> for Line<'_> {
|
||||||
let pre = caps["pre"].to_owned();
|
let pre = caps["pre"].to_owned();
|
||||||
let hash = caps["hash"].to_owned();
|
let hash = caps["hash"].to_owned();
|
||||||
let message = caps["message"].to_owned();
|
let message = caps["message"].to_owned();
|
||||||
|
info!(branches=?caps["branches"], "raw branches");
|
||||||
let mut branches = BRANCHES
|
let mut branches = BRANCHES
|
||||||
.captures_iter(&caps["branches"])
|
.captures_iter(&caps["branches"])
|
||||||
.map(|captures| captures["branch"].to_owned())
|
.map(|captures| captures["branch"].to_owned())
|
||||||
|
@ -78,6 +79,7 @@ impl From<LogLine> for Line<'_> {
|
||||||
} else {
|
} else {
|
||||||
// line withbranches
|
// line withbranches
|
||||||
let mut spans = vec![pre.into(), " ".into(), hash.into(), " ".into()];
|
let mut spans = vec![pre.into(), " ".into(), hash.into(), " ".into()];
|
||||||
|
info!(?branches, "matched branch list");
|
||||||
branches.sort();
|
branches.sort();
|
||||||
branches
|
branches
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
Loading…
Reference in a new issue