io: improve mixed stdout + stderr progress output behavior

Summary:
Rework the progress. Always move the cursor to the top-left corner of the
progress output. So the clear progress instruction is just to erase till
the end of the screen. There is no need to track the height of the progress.

Update flush logic so we only do flush when crossing the progress/non-progress
boundary: When we write progress (to stderr), flush stdout, write progress,
then flush stderr.

Also, disable progress unconditionally if the current output line is incomplete.

Reviewed By: sfilipco

Differential Revision: D27109228

fbshipit-source-id: 717345e9c7eaeebeb378ce090f7b2f60957fd150
This commit is contained in:
Jun Wu 2021-03-17 09:22:44 -07:00 committed by Facebook GitHub Bot
parent 985939bc25
commit 667c6a1274
5 changed files with 1020 additions and 515 deletions

View File

@ -43,8 +43,12 @@ struct Inner {
error: Option<Box<dyn Write>>,
progress: Option<Box<dyn Write>>,
// Used to decide how to clear the progress (using the error stream).
progress_lines: usize,
// Used to decide whether to render progress bars.
output_on_new_line: bool,
error_on_new_line: bool,
// Whether progress is non-empty.
progress_has_content: bool,
// Whether progress (stderr) and stdout (is likely) sharing output.
progress_conflict_with_output: bool,
pager_handle: Option<JoinHandle<streampager::Result<()>>>,
@ -103,6 +107,8 @@ impl io::Write for IOError {
None => return Ok(buf.len()),
};
let mut inner = inner.lock();
inner.clear_progress_for_error()?;
inner.error_on_new_line = buf.ends_with(b"\n");
if let Some(error) = inner.error.as_mut() {
error.write(buf)
} else {
@ -131,7 +137,8 @@ impl io::Write for IOOutput {
None => return Ok(buf.len()),
};
let mut inner = inner.lock();
inner.clear_progress_if_conflict()?;
inner.clear_progress_for_output()?;
inner.output_on_new_line = buf.ends_with(b"\n");
inner.output.write(buf)
}
@ -141,7 +148,6 @@ impl io::Write for IOOutput {
None => return Ok(()),
};
let mut inner = inner.lock();
inner.clear_progress_if_conflict()?;
inner.output.flush()
}
}
@ -211,8 +217,10 @@ impl IO {
error: error.map(|e| Box::new(e) as Box<dyn Write>),
progress: None,
pager_handle: None,
progress_lines: 0,
progress_conflict_with_output,
output_on_new_line: true,
error_on_new_line: true,
progress_has_content: false,
};
Self {
@ -231,7 +239,6 @@ impl IO {
inner.output = Box::new(io::stdout());
inner.error = Some(Box::new(io::stderr()));
inner.progress = None;
inner.progress_lines = 0;
// Wait for the pager (if running).
let mut handle = None;
@ -247,7 +254,8 @@ impl IO {
pub fn write(&self, data: impl AsRef<[u8]>) -> io::Result<()> {
let data = data.as_ref();
let mut inner = self.inner.lock();
inner.clear_progress()?;
inner.clear_progress_for_output()?;
inner.output_on_new_line = data.ends_with(b"\n");
inner.output.write_all(data)?;
Ok(())
}
@ -255,7 +263,8 @@ impl IO {
pub fn write_err(&self, data: impl AsRef<[u8]>) -> io::Result<()> {
let data = data.as_ref();
let mut inner = self.inner.lock();
inner.clear_progress()?;
inner.clear_progress_for_error()?;
inner.error_on_new_line = data.ends_with(b"\n");
if let Some(ref mut error) = inner.error {
error.write_all(data)?;
}
@ -280,8 +289,10 @@ impl IO {
error: Some(Box::new(io::stderr())),
progress: None,
pager_handle: None,
progress_lines: 0,
progress_conflict_with_output,
progress_has_content: false,
output_on_new_line: true,
error_on_new_line: true,
};
Self {
inner: Arc::new(Mutex::new(inner)),
@ -328,7 +339,7 @@ impl IO {
if inner.pager_handle.is_some() {
return Ok(());
}
inner.clear_progress()?;
inner.set_progress("")?;
let mut pager =
Pager::new_using_stdio().map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;
@ -386,58 +397,78 @@ impl Inner {
Ok(())
}
/// Calculate the sequences to clear the progress bar.
fn clear_progress_str(&self) -> String {
// See https://en.wikipedia.org/wiki/ANSI_escape_code
match self.progress_lines {
0 => String::new(),
1 => "\r\x1b[K".to_string(),
n => format!("\r\x1b[{}A\x1b[J", n - 1),
}
}
/// Clear the progress bar.
fn clear_progress(&mut self) -> io::Result<()> {
if self.progress_lines > 0 {
let s = self.clear_progress_str();
if let Some(ref mut error) = self.error {
error.write_all(s.as_bytes())?;
/// Clear the progress (temporarily) for other output.
fn clear_progress_for_error(&mut self) -> io::Result<()> {
if self.progress_has_content && self.progress.is_none() {
self.progress_has_content = false;
if let Some(e) = self.error.as_mut() {
e.write_all(ANSI_ERASE_DISPLAY.as_bytes())?;
}
self.progress_lines = 0;
}
Ok(())
}
/// Clear the progress bar if it conflicts with "stdout" output.
fn clear_progress_if_conflict(&mut self) -> io::Result<()> {
/// Clear the progress (temporarily) if it ("stderr") conflicts with "stdout" output.
fn clear_progress_for_output(&mut self) -> io::Result<()> {
// If self.progress is set. Progress writes to streampager, and does not need clear.
if self.progress_conflict_with_output && self.progress.is_none() {
self.clear_progress()
} else {
Ok(())
self.clear_progress_for_error()?;
}
Ok(())
}
fn set_progress(&mut self, data: &str) -> io::Result<()> {
let inner = self;
let mut data = data.trim_end();
if let Some(ref mut progress) = inner.progress {
// \x0c (\f) is defined by streampager.
let data = format!("{}\x0c", data);
progress.write_all(data.as_bytes())?;
progress.flush()?;
} else {
let clear_progress_str = inner.clear_progress_str();
if !inner.output_on_new_line || !inner.error_on_new_line {
// There is a line that hasn't ended.
// Not suitable to render progress bars.
data = "";
}
// Fast path: empty progress, unchanged.
if data.is_empty() && !inner.progress_has_content {
return Ok(());
}
if let Some(ref mut error) = inner.error {
// Write progress to stderr.
let data = data.trim_end();
// Write the progress clear sequences within one syscall if possible, to reduce flash.
let message = format!("{}{}", clear_progress_str, data);
error.write_all(message.as_bytes())?;
error.flush()?;
if data.is_empty() {
inner.progress_lines = 0;
} else {
inner.progress_lines = data.chars().filter(|&c| c == '\n').count() + 1;
// Flush pending output if it might conflict with progress.
if inner.progress_conflict_with_output {
inner.output.flush()?;
}
let erase = if inner.progress_has_content {
ANSI_ERASE_DISPLAY
} else {
""
};
// Write progress to stderr.
// Move to the left-top corner of the progress output.
let move_up = {
let lines = if data.is_empty() {
0
} else {
data.chars().filter(|&c| c == '\n').count() + 1
};
match lines {
0 => "".to_string(),
1 => "\r".to_string(),
n => format!("\r\x1b[{}A", n - 1),
}
};
// Write the progress clear sequences within one syscall if possible, to reduce flash.
let message = format!("{}{}{}", erase, data, move_up);
if !message.is_empty() {
error.write_all(message.as_bytes())?;
error.flush()?;
}
inner.progress_has_content = !data.is_empty();
}
}
Ok(())
@ -446,7 +477,7 @@ impl Inner {
impl Drop for Inner {
fn drop(&mut self) {
let _ = self.clear_progress();
let _ = self.set_progress("");
let _ = self.flush();
// Drop the output and error. This sends EOF to pager.
self.output = Box::new(Vec::new());
@ -460,3 +491,6 @@ impl Drop for Inner {
}
}
}
// CSI J - Clear from cursor to end of screen.
const ANSI_ERASE_DISPLAY: &str = "\r\x1b[J";

View File

@ -7,10 +7,14 @@
simple test
$ hg progresstest 4 4
progress test [============> ] 1/4 04s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 03s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 02s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
no progress with --quiet
$ hg progresstest --quiet 4 4
@ -18,188 +22,329 @@ no progress with --quiet
test nested short-lived topics (which shouldn't display with changedelay)
$ hg progresstest --nested 4 4
progress test [ ] 0/4\r (no-eol) (esc)
\x1b[Kprogress test [ ] 0/4\r (no-eol) (esc)
\x1b[Kprogress test [ ] 0/4\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 1/4 13s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 1/4 16s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 1/4 19s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 1/4 22s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 09s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 10s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 11s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 12s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 06s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ ] 0/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ ] 0/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 1/4 13s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 1/4 16s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 1/4 19s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 1/4 22s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 09s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 11s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 06s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test nested long-lived topics
$ hg progresstest --nested 8 8
progress test [ ] 0/8\r (no-eol) (esc)
\x1b[Kprogress test [ ] 0/8\r (no-eol) (esc)
\x1b[Kprogress test [ ] 0/8\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 29s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 36s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 43s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 50s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 25s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 28s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 31s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 34s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 21s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 22s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 24s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 26s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 17s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 18s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 19s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 20s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 15s\r (no-eol) (esc)
\x1b[Knested progress [==============================> ] 3/5 03s\r (no-eol) (esc)
\x1b[Knested progress [=========================================> ] 4/5 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 5/5 01s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ ] 0/8\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ ] 0/8\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 29s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 36s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 43s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 50s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 25s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 28s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 31s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 34s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 21s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 22s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 24s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 26s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 17s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 18s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 19s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 20s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 15s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [==============================> ] 3/5 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================================> ] 4/5 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 5/5 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test nested shortlived topics without changedelay
$ hg progresstest --nested --config progress.changedelay=0 8 8
progress test [ ] 0/8\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 29s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 36s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 25s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 28s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 21s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 22s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 17s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 18s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Knested progress [=========> ] 1/5 05s\r (no-eol) (esc)
\x1b[Knested progress [====================> ] 2/5 04s\r (no-eol) (esc)
\x1b[Knested progress [==============================> ] 3/5 03s\r (no-eol) (esc)
\x1b[Knested progress [=========================================> ] 4/5 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 5/5 01s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 29s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 36s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 25s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 28s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 21s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 22s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 17s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 18s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========> ] 1/5 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================> ] 2/5 04s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [==============================> ] 3/5 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================================> ] 4/5 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 5/5 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test format options
$ hg progresstest --config progress.format='number item-3 bar' 4 4
1/4 p 1 [================> ]\r (no-eol) (esc)
\x1b[K2/4 p 2 [=================================> ]\r (no-eol) (esc)
\x1b[K3/4 p 3 [==================================================> ]\r (no-eol) (esc)
\x1b[K4/4 p 4 [====================================================================>]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J2/4 p 2 [=================================> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J3/4 p 3 [==================================================> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J4/4 p 4 [====================================================================>]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test format options and indeterminate progress
$ hg progresstest --config progress.format='number item bar' -- 4 -1
1 loop 1 [ <=> ]\r (no-eol) (esc)
\x1b[K2 loop 2 [ <=> ]\r (no-eol) (esc)
\x1b[K3 loop 3 [ <=> ]\r (no-eol) (esc)
\x1b[K4 loop 4 [ <=> ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J2 loop 2 [ <=> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J3 loop 3 [ <=> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J4 loop 4 [ <=> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test count over total
$ hg progresstest 6 4
progress test [============> ] 1/4 04s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 03s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 02s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[Kprogress test [ <=> ] 5/4\r (no-eol) (esc)
\x1b[Kprogress test [ <=> ] 6/4\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ <=> ] 5/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ <=> ] 6/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test rendering with bytes
$ hg bytesprogresstest
bytes progress test [ ] 10 bytes/1.03 GB 3y28w\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 250 bytes/1.03 GB 14w05d\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 999 bytes/1.03 GB 5w04d\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 1000 bytes/1.03 GB 7w03d\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 1.00 KB/1.03 GB 9w00d\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 21.5 KB/1.03 GB 3d13h\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 1.00 MB/1.03 GB 2h04m\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 1.41 MB/1.03 GB 1h41m\r (no-eol) (esc)
\x1b[Kbytes progress test [==> ] 118 MB/1.03 GB 1m13s\r (no-eol) (esc)
\x1b[Kbytes progress test [=================> ] 530 MB/1.03 GB 11s\r (no-eol) (esc)
\x1b[Kbytes progress test [================================> ] 954 MB/1.03 GB 02s\r (no-eol) (esc)
\x1b[Kbytes progress test [====================================>] 1.03 GB/1.03 GB 01s\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 250 bytes/1.03 GB 14w05d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 999 bytes/1.03 GB 5w04d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 1000 bytes/1.03 GB 7w03d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 1.00 KB/1.03 GB 9w00d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 21.5 KB/1.03 GB 3d13h\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 1.00 MB/1.03 GB 2h04m\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 1.41 MB/1.03 GB 1h41m\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [==> ] 118 MB/1.03 GB 1m13s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [=================> ] 530 MB/1.03 GB 11s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [================================> ] 954 MB/1.03 GB 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [====================================>] 1.03 GB/1.03 GB 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test immediate completion
$ hg progresstest 0 0
test unicode topic
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='topic number'
あいうえ 1/4\r (no-eol) (esc)
\x1b[Kあいうえ 2/4\r (no-eol) (esc)
\x1b[Kあいうえ 3/4\r (no-eol) (esc)
\x1b[Kあいうえ 4/4\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 2/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 3/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 4/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test line trimming when progress topic contains multi-byte characters
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.width=12 --config progress.format='topic number'
あいうえ 1/4\r (no-eol) (esc)
\x1b[Kあいうえ 2/4\r (no-eol) (esc)
\x1b[Kあいうえ 3/4\r (no-eol) (esc)
\x1b[Kあいうえ 4/4\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 2/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 3/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 4/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test calculation of bar width when progress topic contains multi-byte characters
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.width=21 --config progress.format='topic bar'
あいうえ [=> ]\r (no-eol) (esc)
\x1b[Kあいうえ [===> ]\r (no-eol) (esc)
\x1b[Kあいうえ [=====> ]\r (no-eol) (esc)
\x1b[Kあいうえ [========>]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ [===> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ [=====> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ [========>]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test trimming progress items with they contain multi-byte characters
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='item+6'
あいう\r (no-eol) (esc)
\x1b[Kあいう\r (no-eol) (esc)
\x1b[Kあい\r (no-eol) (esc)
\x1b[Kあいう\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいう\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあい\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいう\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='item-6'
あいう\r (no-eol) (esc)
\x1b[Kいうえ\r (no-eol) (esc)
\x1b[Kあい\r (no-eol) (esc)
\x1b[Kあいう\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jいうえ\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあい\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいう\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)

View File

@ -8,10 +8,14 @@
simple test
$ hg progresstest 4 4
[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 04s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
no progress with --quiet
$ hg progresstest --quiet 4 4
@ -19,196 +23,345 @@ no progress with --quiet
test nested short-lived topics (which shouldn't display with changedelay)
$ hg progresstest --nested 4 4
[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/4 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/4 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/4 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 13s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 16s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 19s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 22s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 09s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 10s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 11s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 12s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 06s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/4 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/4 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 13s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 16s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 19s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 22s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 09s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 10s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 11s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 12s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 06s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test nested long-lived topics
$ hg progresstest --nested 8 8
[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/8 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/8 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/8 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 29s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 36s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 43s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 50s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 25s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 28s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 31s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 34s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 21s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 22s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 24s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 26s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 17s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 18s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 19s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 20s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 15s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/5 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/5 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 5 ][progress.fancy.bar.normal progress.fancy.count| 5/5 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/8 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/8 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 29s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 36s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 43s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 50s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 25s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 28s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 31s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 34s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 21s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 22s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 24s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 26s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 17s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 18s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 19s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 20s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 15s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/5 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/5 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 5 ][progress.fancy.bar.normal progress.fancy.count| 5/5 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test nested shortlived topics without changedelay
$ hg progresstest --nested --config progress.changedelay=0 8 8
[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 0 ][progress.fancy.bar.background progress.fancy.count| 0/8 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 29s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 36s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 25s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 28s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 21s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 22s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 17s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 18s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested prog][progress.fancy.bar.background progress.fancy.topic|ress: ][progress.fancy.bar.background progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.count| 1/5 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/5 04s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/5 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/5 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 5 ][progress.fancy.bar.normal progress.fancy.count| 5/5 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 29s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progre][progress.fancy.bar.background progress.fancy.topic|ss test: ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/8 36s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 25s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.count| 2/8 28s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 21s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/8 22s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 17s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/8 18s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 5/8 12s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested prog][progress.fancy.bar.background progress.fancy.topic|ress: ][progress.fancy.bar.background progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.count| 1/5 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/5 04s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/5 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 4 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4/5 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 5 ][progress.fancy.bar.normal progress.fancy.count| 5/5 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 6/8 10s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 7 ][progress.fancy.bar.normal progress.fancy.count| ][progress.fancy.bar.background progress.fancy.count|7/8 05s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 8 ][progress.fancy.bar.normal progress.fancy.count| 8/8 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/2 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| nested progress: ][progress.fancy.bar.normal progress.fancy.item|nest 2 ][progress.fancy.bar.normal progress.fancy.count| 2/2 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test format options
$ hg progresstest --config progress.format='number item-3 bar' 4 4
[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 04s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test format options and indeterminate progress
$ hg progresstest --config progress.format='number item bar' -- 4 -1
[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop][progress.fancy.bar.indeterminate progress.fancy.item| 1 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.indeterminate progress.fancy.item| ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 3 ][progress.fancy.bar.indeterminate progress.fancy.item| ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 4 ][progress.fancy.bar.indeterminate progress.fancy.item| ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4 ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 2 ][progress.fancy.bar.indeterminate progress.fancy.item| ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 3 ][progress.fancy.bar.indeterminate progress.fancy.item| ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|loop 4 ][progress.fancy.bar.indeterminate progress.fancy.item| ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 4 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test count over total
$ hg progresstest 6 4
[progress.fancy.bar.normal progress.fancy.topic| progress test:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.item|loop 1 ][progress.fancy.bar.background progress.fancy.count| 1/4 04s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.normal progress.fancy.count| 5/4 ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.normal progress.fancy.count| 6/4 ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 2 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 3 ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 4 ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 5 ][progress.fancy.bar.normal progress.fancy.count| 5/4 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| progress test: ][progress.fancy.bar.normal progress.fancy.item|loop 6 ][progress.fancy.bar.normal progress.fancy.count| 6/4 ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test rendering with bytes
$ hg bytesprogresstest
[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|10 bytes ][progress.fancy.bar.background progress.fancy.count| 10 bytes/1.03 GB 3y28w ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|250 bytes ][progress.fancy.bar.background progress.fancy.count| 250 bytes/1.03 GB 14w05d ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|999 bytes ][progress.fancy.bar.background progress.fancy.count| 999 bytes/1.03 GB 5w04d ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|1000 bytes ][progress.fancy.bar.background progress.fancy.count| 1000 bytes/1.03 GB 7w03d ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|1024 bytes ][progress.fancy.bar.background progress.fancy.count| 1.00 KB/1.03 GB 9w00d ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|22000 bytes ][progress.fancy.bar.background progress.fancy.count| 21.5 KB/1.03 GB 3d13h ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|1048576 bytes ][progress.fancy.bar.background progress.fancy.count| 1.00 MB/1.03 GB 2h04m ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|1474560 bytes ][progress.fancy.bar.background progress.fancy.count| 1.41 MB/1.03 GB 1h41m ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| bytes][progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|123456789 byte][progress.fancy.bar.background progress.fancy.count| 118 MB/1.03 GB 1m13s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| bytes progress test: ][progress.fancy.bar.normal progress.fancy.item|5555555][progress.fancy.bar.background progress.fancy.item|55 bytes ][progress.fancy.bar.background progress.fancy.count| 530 MB/1.03 GB 11s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| bytes progress test: ][progress.fancy.bar.normal progress.fancy.item|1000000000 bytes][progress.fancy.bar.normal progress.fancy.count| 954 MB/1.03 G][progress.fancy.bar.background progress.fancy.count|B 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| bytes progress test: ][progress.fancy.bar.normal progress.fancy.item|1111111111 bytes][progress.fancy.bar.normal progress.fancy.count| 1.03 GB/1.03 GB 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|250 bytes ][progress.fancy.bar.background progress.fancy.count| 250 bytes/1.03 GB 14w05d ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|999 bytes ][progress.fancy.bar.background progress.fancy.count| 999 bytes/1.03 GB 5w04d ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|1000 bytes ][progress.fancy.bar.background progress.fancy.count| 1000 bytes/1.03 GB 7w03d ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|1024 bytes ][progress.fancy.bar.background progress.fancy.count| 1.00 KB/1.03 GB 9w00d ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|22000 bytes ][progress.fancy.bar.background progress.fancy.count| 21.5 KB/1.03 GB 3d13h ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|1048576 bytes ][progress.fancy.bar.background progress.fancy.count| 1.00 MB/1.03 GB 2h04m ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.background progress.fancy.topic| bytes progress test: ][progress.fancy.bar.background progress.fancy.item|1474560 bytes ][progress.fancy.bar.background progress.fancy.count| 1.41 MB/1.03 GB 1h41m ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| bytes][progress.fancy.bar.background progress.fancy.topic| progress test: ][progress.fancy.bar.background progress.fancy.item|123456789 byte][progress.fancy.bar.background progress.fancy.count| 118 MB/1.03 GB 1m13s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| bytes progress test: ][progress.fancy.bar.normal progress.fancy.item|5555555][progress.fancy.bar.background progress.fancy.item|55 bytes ][progress.fancy.bar.background progress.fancy.count| 530 MB/1.03 GB 11s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| bytes progress test: ][progress.fancy.bar.normal progress.fancy.item|1000000000 bytes][progress.fancy.bar.normal progress.fancy.count| 954 MB/1.03 G][progress.fancy.bar.background progress.fancy.count|B 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| bytes progress test: ][progress.fancy.bar.normal progress.fancy.item|1111111111 bytes][progress.fancy.bar.normal progress.fancy.count| 1.03 GB/1.03 GB 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test immediate completion
$ hg progresstest 0 0
test unicode topic
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='topic number'
[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/4 04s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいうえ ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいう ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいうえ ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいう ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test line trimming when progress topic contains multi-byte characters
$ hg --encoding utf-8 progresstest 12 12 --unicode --config progress.width=12 --config progress.format='topic number'
[progress.fancy.bar.normal progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.topic|あいうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.topic|あいうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.topic|いうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.topic|いうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あい][progress.fancy.bar.background progress.fancy.topic|うえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あい][progress.fancy.bar.background progress.fancy.topic|うえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいう][progress.fancy.bar.background progress.fancy.topic|え: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいう][progress.fancy.bar.background progress.fancy.topic|え: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ][progress.fancy.bar.background progress.fancy.topic|: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.count| ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.topic|あいうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.topic|いうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.topic|いうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あい][progress.fancy.bar.background progress.fancy.topic|うえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あい][progress.fancy.bar.background progress.fancy.topic|うえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいう][progress.fancy.bar.background progress.fancy.topic|え: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいう][progress.fancy.bar.background progress.fancy.topic|え: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ][progress.fancy.bar.background progress.fancy.topic|: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.background progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.count| ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test calculation of bar width when progress topic contains multi-byte characters
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.width=21 --config progress.format='topic bar'
[progress.fancy.bar.normal progress.fancy.topic| あい][progress.fancy.bar.background progress.fancy.topic|うえ: ][progress.fancy.bar.background progress.fancy.count| 1/4 04s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.count| 3/][progress.fancy.bar.background progress.fancy.count|4 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ:][progress.fancy.bar.background progress.fancy.topic| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.count| 3/][progress.fancy.bar.background progress.fancy.count|4 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
test trimming progress items with they contain multi-byte characters
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='item+6'
[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/4 04s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいうえ ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいう ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいうえ ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいう ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
$ hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='item-6'
[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 1/4 04s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいうえ ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\x1b[K[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいう ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいうえ ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 2/4 03s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あい ][progress.fancy.bar.background progress.fancy.item| ][progress.fancy.bar.background progress.fancy.count| 3/4 02s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J[progress.fancy.bar.normal progress.fancy.topic| あいうえ: ][progress.fancy.bar.normal progress.fancy.item|あいう ][progress.fancy.bar.normal progress.fancy.count| 4/4 01s ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)

View File

@ -7,44 +7,72 @@
Test creating a progress spinner.
$ hg rustspinnertest 5
loop 1 [ <=> ] 1.0\r (no-eol) (esc)
\x1b[Kloop 2 [ <=> ] 2.0\r (no-eol) (esc)
\x1b[Kloop 3 [ <=> ] 3.0\r (no-eol) (esc)
\x1b[Kloop 4 [ <=> ] 4.0\r (no-eol) (esc)
\x1b[Kloop 5 [ <=> ] 5.0\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 2 [ <=> ] 2.0\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 3 [ <=> ] 3.0\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 4 [ <=> ] 4.0\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 5 [ <=> ] 5.0\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
Test creating a progress bar.
$ hg rustprogresstest 6 6
loop 1 [===================> ] 1/3 03s\r (no-eol) (esc)
\x1b[Kloop 2 [========================================> ] 2/3 02s\r (no-eol) (esc)
\x1b[Kloop 3 [=============================================================>] 3/3 01s\r (no-eol) (esc)
\x1b[Kloop 4 [========================================> ] 4/6 03s\r (no-eol) (esc)
\x1b[Kloop 5 [==================================================> ] 5/6 02s\r (no-eol) (esc)
\x1b[Kloop 6 [=============================================================>] 6/6 01s\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 2 [========================================> ] 2/3 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 3 [=============================================================>] 3/3 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 4 [========================================> ] 4/6 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 5 [==================================================> ] 5/6 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 6 [=============================================================>] 6/6 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
Test creating an indeterminate (i.e., no total) progress bar.
$ hg rustprogresstest -- 5 -1
loop 1 [ <=> ] 1\r (no-eol) (esc)
\x1b[Kloop 2 [ <=> ] 2\r (no-eol) (esc)
\x1b[Kloop 3 [ <=> ] 3\r (no-eol) (esc)
\x1b[Kloop 4 [ <=> ] 4\r (no-eol) (esc)
\x1b[Kloop 5 [ <=> ] 5\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 2 [ <=> ] 2\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 3 [ <=> ] 3\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 4 [ <=> ] 4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 5 [ <=> ] 5\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)
Test formatting the number as bytes.
Note that the first iteration is not rendered because the first value is 0.
$ hg rustbytesprogresstest
loop 2 [ ] 10 bytes/1.03 GB 3y28w\r (no-eol) (esc)
\x1b[Kloop 3 [ ] 250 bytes/1.03 GB 14w05d\r (no-eol) (esc)
\x1b[Kloop 4 [ ] 999 bytes/1.03 GB 5w04d\r (no-eol) (esc)
\x1b[Kloop 5 [ ] 1000 bytes/1.03 GB 7w03d\r (no-eol) (esc)
\x1b[Kloop 6 [ ] 1.00 KB/1.03 GB 9w00d\r (no-eol) (esc)
\x1b[Kloop 7 [ ] 21.5 KB/1.03 GB 3d13h\r (no-eol) (esc)
\x1b[Kloop 8 [ ] 1.00 MB/1.03 GB 2h04m\r (no-eol) (esc)
\x1b[Kloop 9 [ ] 1.41 MB/1.03 GB 1h41m\r (no-eol) (esc)
\x1b[Kloop 10 [====> ] 118 MB/1.03 GB 1m13s\r (no-eol) (esc)
\x1b[Kloop 11 [=======================> ] 530 MB/1.03 GB 11s\r (no-eol) (esc)
\x1b[Kloop 12 [===========================================> ] 954 MB/1.03 GB 02s\r (no-eol) (esc)
\x1b[Kloop 13 [================================================>] 1.03 GB/1.03 GB 01s\r (no-eol) (esc)
\x1b[K (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 3 [ ] 250 bytes/1.03 GB 14w05d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 4 [ ] 999 bytes/1.03 GB 5w04d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 5 [ ] 1000 bytes/1.03 GB 7w03d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 6 [ ] 1.00 KB/1.03 GB 9w00d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 7 [ ] 21.5 KB/1.03 GB 3d13h\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 8 [ ] 1.00 MB/1.03 GB 2h04m\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 9 [ ] 1.41 MB/1.03 GB 1h41m\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 10 [====> ] 118 MB/1.03 GB 1m13s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 11 [=======================> ] 530 MB/1.03 GB 11s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 12 [===========================================> ] 954 MB/1.03 GB 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jloop 13 [================================================>] 1.03 GB/1.03 GB 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J (no-eol) (esc)

View File

@ -15,10 +15,14 @@
simple test
$ withprogress hg progresstest 4 4
progress test [============> ] 1/4 04s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 03s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 02s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 4, "estimate_str": "04s", "item": "loop 1", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 3, "estimate_str": "03s", "item": "loop 2", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "loop 3", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
@ -45,25 +49,44 @@ progress output suppressed by setting the null renderer
test nested short-lived topics (which shouldn't display with changedelay)
$ withprogress hg progresstest --nested 4 4
progress test [ ] 0/4\r (no-eol) (esc)
\x1b[Kprogress test [ ] 0/4\r (no-eol) (esc)
\x1b[Kprogress test [ ] 0/4\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 1/4 13s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 1/4 16s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 1/4 19s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 1/4 22s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 09s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 10s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 11s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 12s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 06s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
\r (no-eol) (esc)
\x1b[Jprogress test [ ] 0/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ ] 0/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 1/4 13s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 1/4 16s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 1/4 19s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 1/4 22s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 09s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 11s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 06s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
{"state": {"nested progress": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "nest 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": null}, "progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": "0 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
{"state": {"nested progress": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "nest 1", "pid": 42, "pos": 1, "speed_str": null, "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": null}, "progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": "0 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
{"state": {"nested progress": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "nest 2", "pid": 42, "pos": 2, "speed_str": null, "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": null}, "progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": "0 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
@ -88,44 +111,82 @@ test nested short-lived topics (which shouldn't display with changedelay)
test nested long-lived topics
$ withprogress hg progresstest --nested 8 8
progress test [ ] 0/8\r (no-eol) (esc)
\x1b[Kprogress test [ ] 0/8\r (no-eol) (esc)
\x1b[Kprogress test [ ] 0/8\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 29s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 36s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 43s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 50s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 25s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 28s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 31s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 34s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 21s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 22s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 24s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 26s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 17s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 18s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 19s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 20s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 15s\r (no-eol) (esc)
\x1b[Knested progress [==============================> ] 3/5 03s\r (no-eol) (esc)
\x1b[Knested progress [=========================================> ] 4/5 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 5/5 01s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
\r (no-eol) (esc)
\x1b[Jprogress test [ ] 0/8\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ ] 0/8\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 29s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 36s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 43s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 50s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 25s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 28s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 31s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 34s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 21s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 22s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 24s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 26s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 17s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 18s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 19s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 20s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 15s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [==============================> ] 3/5 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================================> ] 4/5 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 5/5 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
{"state": {"nested progress": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "nest 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": null}, "progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": "0 cycles/sec", "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
{"state": {"nested progress": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "nest 1", "pid": 42, "pos": 1, "speed_str": null, "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": null}, "progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": "0 cycles/sec", "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
{"state": {"nested progress": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "nest 2", "pid": 42, "pos": 2, "speed_str": null, "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": null}, "progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": "0 cycles/sec", "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
@ -169,44 +230,82 @@ test nested long-lived topics
test nested shortlived topics without changedelay
$ withprogress hg progresstest --nested --config progress.changedelay=0 8 8
progress test [ ] 0/8\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 29s\r (no-eol) (esc)
\x1b[Kprogress test [=====> ] 1/8 36s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 25s\r (no-eol) (esc)
\x1b[Kprogress test [============> ] 2/8 28s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 21s\r (no-eol) (esc)
\x1b[Kprogress test [===================> ] 3/8 22s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 17s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 4/8 18s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Kprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\x1b[Knested progress [=========> ] 1/5 05s\r (no-eol) (esc)
\x1b[Knested progress [====================> ] 2/5 04s\r (no-eol) (esc)
\x1b[Knested progress [==============================> ] 3/5 03s\r (no-eol) (esc)
\x1b[Knested progress [=========================================> ] 4/5 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 5/5 01s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Kprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\x1b[Knested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\x1b[Knested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 29s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=====> ] 1/8 36s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 25s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [============> ] 2/8 28s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 21s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===================> ] 3/8 22s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 17s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 4/8 18s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [=================================> ] 5/8 12s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========> ] 1/5 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================> ] 2/5 04s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [==============================> ] 3/5 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================================> ] 4/5 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 5/5 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 6/8 10s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [===============================================> ] 7/8 05s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 8/8 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [=========================> ] 1/2 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jnested progress [====================================================>] 2/2 01s\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
{"state": {"nested progress": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "nest 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": null}, "progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": "0 cycles/sec", "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
{"state": {"nested progress": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "nest 1", "pid": 42, "pos": 1, "speed_str": "1 per sec", "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": 1}, "progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
{"state": {"nested progress": {"active": true, "estimate_sec": 1, "estimate_str": "01s", "item": "nest 2", "pid": 42, "pos": 2, "speed_str": "1 per sec", "topic": "nested progress", "total": 2, "unit": null, "units_per_sec": 1}, "progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 8, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test", "nested progress"]}
@ -250,10 +349,14 @@ test nested shortlived topics without changedelay
test format options
$ withprogress hg progresstest --config progress.format='number item-3 bar' 4 4
1/4 p 1 [================> ]\r (no-eol) (esc)
\x1b[K2/4 p 2 [=================================> ]\r (no-eol) (esc)
\x1b[K3/4 p 3 [==================================================> ]\r (no-eol) (esc)
\x1b[K4/4 p 4 [====================================================================>]\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
\r (no-eol) (esc)
\x1b[J2/4 p 2 [=================================> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J3/4 p 3 [==================================================> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J4/4 p 4 [====================================================================>]\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 4, "estimate_str": "04s", "item": "loop 1", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 3, "estimate_str": "03s", "item": "loop 2", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "loop 3", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
@ -263,10 +366,14 @@ test format options
test format options and indeterminate progress
$ withprogress hg progresstest --config progress.format='number item bar' -- 4 -1
1 loop 1 [ <=> ]\r (no-eol) (esc)
\x1b[K2 loop 2 [ <=> ]\r (no-eol) (esc)
\x1b[K3 loop 3 [ <=> ]\r (no-eol) (esc)
\x1b[K4 loop 4 [ <=> ]\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": null, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
\r (no-eol) (esc)
\x1b[J2 loop 2 [ <=> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J3 loop 3 [ <=> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[J4 loop 4 [ <=> ]\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": null, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 1", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "progress test", "total": null, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 2", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "progress test", "total": null, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": null, "estimate_str": null, "item": "loop 3", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "progress test", "total": null, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
@ -276,12 +383,18 @@ test format options and indeterminate progress
test count over total
$ withprogress hg progresstest 6 4
progress test [============> ] 1/4 04s\r (no-eol) (esc)
\x1b[Kprogress test [==========================> ] 2/4 03s\r (no-eol) (esc)
\x1b[Kprogress test [========================================> ] 3/4 02s\r (no-eol) (esc)
\x1b[Kprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\x1b[Kprogress test [ <=> ] 5/4\r (no-eol) (esc)
\x1b[Kprogress test [ <=> ] 6/4\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
\r (no-eol) (esc)
\x1b[Jprogress test [==========================> ] 2/4 03s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [========================================> ] 3/4 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [======================================================>] 4/4 01s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ <=> ] 5/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jprogress test [ <=> ] 6/4\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "loop 0", "pid": 42, "pos": 0, "speed_str": null, "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 4, "estimate_str": "04s", "item": "loop 1", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 3, "estimate_str": "03s", "item": "loop 2", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
{"state": {"progress test": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "loop 3", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "progress test", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["progress test"]}
@ -293,18 +406,30 @@ test count over total
test rendering with bytes
$ withprogress hg bytesprogresstest
bytes progress test [ ] 10 bytes/1.03 GB 3y28w\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 250 bytes/1.03 GB 14w05d\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 999 bytes/1.03 GB 5w04d\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 1000 bytes/1.03 GB 7w03d\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 1.00 KB/1.03 GB 9w00d\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 21.5 KB/1.03 GB 3d13h\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 1.00 MB/1.03 GB 2h04m\r (no-eol) (esc)
\x1b[Kbytes progress test [ ] 1.41 MB/1.03 GB 1h41m\r (no-eol) (esc)
\x1b[Kbytes progress test [==> ] 118 MB/1.03 GB 1m13s\r (no-eol) (esc)
\x1b[Kbytes progress test [=================> ] 530 MB/1.03 GB 11s\r (no-eol) (esc)
\x1b[Kbytes progress test [================================> ] 954 MB/1.03 GB 02s\r (no-eol) (esc)
\x1b[Kbytes progress test [====================================>] 1.03 GB/1.03 GB 01s\r (no-eol) (esc)
{"state": {"bytes progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "0 bytes", "pid": 42, "pos": 0, "speed_str": null, "topic": "bytes progress test", "total": 1111111111, "unit": "bytes", "units_per_sec": null}}, "topics": ["bytes progress test"]}
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 250 bytes/1.03 GB 14w05d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 999 bytes/1.03 GB 5w04d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 1000 bytes/1.03 GB 7w03d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 1.00 KB/1.03 GB 9w00d\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 21.5 KB/1.03 GB 3d13h\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 1.00 MB/1.03 GB 2h04m\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [ ] 1.41 MB/1.03 GB 1h41m\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [==> ] 118 MB/1.03 GB 1m13s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [=================> ] 530 MB/1.03 GB 11s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [================================> ] 954 MB/1.03 GB 02s\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jbytes progress test [====================================>] 1.03 GB/1.03 GB 01s\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"bytes progress test": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "0 bytes", "pid": 42, "pos": 0, "speed_str": null, "topic": "bytes progress test", "total": 1111111111, "unit": "bytes", "units_per_sec": null}}, "topics": ["bytes progress test"]}
{"state": {"bytes progress test": {"active": true, "estimate_sec": 111111111, "estimate_str": "3y28w", "item": "10 bytes", "pid": 42, "pos": 10, "speed_str": "10 bytes/sec", "topic": "bytes progress test", "total": 1111111111, "unit": "bytes", "units_per_sec": 10}}, "topics": ["bytes progress test"]}
{"state": {"bytes progress test": {"active": true, "estimate_sec": 8888887, "estimate_str": "14w05d", "item": "250 bytes", "pid": 42, "pos": 250, "speed_str": "125 bytes/sec", "topic": "bytes progress test", "total": 1111111111, "unit": "bytes", "units_per_sec": 125}}, "topics": ["bytes progress test"]}
{"state": {"bytes progress test": {"active": true, "estimate_sec": 3336668, "estimate_str": "5w04d", "item": "999 bytes", "pid": 42, "pos": 999, "speed_str": "333 bytes/sec", "topic": "bytes progress test", "total": 1111111111, "unit": "bytes", "units_per_sec": 333}}, "topics": ["bytes progress test"]}
@ -325,10 +450,14 @@ test immediate completion
test unicode topic
$ withprogress hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='topic number'
あいうえ 1/4\r (no-eol) (esc)
\x1b[Kあいうえ 2/4\r (no-eol) (esc)
\x1b[Kあいうえ 3/4\r (no-eol) (esc)
\x1b[Kあいうえ 4/4\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
\r (no-eol) (esc)
\x1b[Jあいうえ 2/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 3/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 4/4\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 4, "estimate_str": "04s", "item": "\u3042\u3044\u3046", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 3, "estimate_str": "03s", "item": "\u3042\u3044\u3046\u3048", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "\u3042\u3044", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
@ -338,10 +467,14 @@ test unicode topic
test line trimming when progress topic contains multi-byte characters
$ withprogress hg --encoding utf-8 progresstest 4 4 --unicode --config progress.width=12 --config progress.format='topic number'
あいうえ 1/4\r (no-eol) (esc)
\x1b[Kあいうえ 2/4\r (no-eol) (esc)
\x1b[Kあいうえ 3/4\r (no-eol) (esc)
\x1b[Kあいうえ 4/4\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
\r (no-eol) (esc)
\x1b[Jあいうえ 2/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 3/4\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ 4/4\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 4, "estimate_str": "04s", "item": "\u3042\u3044\u3046", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 3, "estimate_str": "03s", "item": "\u3042\u3044\u3046\u3048", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "\u3042\u3044", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
@ -351,10 +484,14 @@ test line trimming when progress topic contains multi-byte characters
test calculation of bar width when progress topic contains multi-byte characters
$ withprogress hg --encoding utf-8 progresstest 4 4 --unicode --config progress.width=21 --config progress.format='topic bar'
あいうえ [=> ]\r (no-eol) (esc)
\x1b[Kあいうえ [===> ]\r (no-eol) (esc)
\x1b[Kあいうえ [=====> ]\r (no-eol) (esc)
\x1b[Kあいうえ [========>]\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
\r (no-eol) (esc)
\x1b[Jあいうえ [===> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ [=====> ]\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいうえ [========>]\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 4, "estimate_str": "04s", "item": "\u3042\u3044\u3046", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 3, "estimate_str": "03s", "item": "\u3042\u3044\u3046\u3048", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "\u3042\u3044", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
@ -364,10 +501,14 @@ test calculation of bar width when progress topic contains multi-byte characters
test trimming progress items with they contain multi-byte characters
$ withprogress hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='item+6'
あいう\r (no-eol) (esc)
\x1b[Kあいう\r (no-eol) (esc)
\x1b[Kあい\r (no-eol) (esc)
\x1b[Kあいう\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
\r (no-eol) (esc)
\x1b[Jあいう\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあい\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいう\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 4, "estimate_str": "04s", "item": "\u3042\u3044\u3046", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 3, "estimate_str": "03s", "item": "\u3042\u3044\u3046\u3048", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "\u3042\u3044", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
@ -375,10 +516,14 @@ test trimming progress items with they contain multi-byte characters
{"state": {}, "topics": []}
$ withprogress hg --encoding utf-8 progresstest 4 4 --unicode --config progress.format='item-6'
あいう\r (no-eol) (esc)
\x1b[Kいうえ\r (no-eol) (esc)
\x1b[Kあい\r (no-eol) (esc)
\x1b[Kあいう\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
\r (no-eol) (esc)
\x1b[Jいうえ\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあい\r (no-eol) (esc)
\r (no-eol) (esc)
\x1b[Jあいう\r (no-eol) (esc)
\r (no-eol) (esc)
{"state": {"\u3042\u3044\u3046\u3048": {"active": false, "estimate_sec": null, "estimate_str": null, "item": "\u3042\u3044", "pid": 42, "pos": 0, "speed_str": null, "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": null}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 4, "estimate_str": "04s", "item": "\u3042\u3044\u3046", "pid": 42, "pos": 1, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 3, "estimate_str": "03s", "item": "\u3042\u3044\u3046\u3048", "pid": 42, "pos": 2, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}
{"state": {"\u3042\u3044\u3046\u3048": {"active": true, "estimate_sec": 2, "estimate_str": "02s", "item": "\u3042\u3044", "pid": 42, "pos": 3, "speed_str": "1 cycles/sec", "topic": "\u3042\u3044\u3046\u3048", "total": 4, "unit": "cycles", "units_per_sec": 1}}, "topics": ["\u3042\u3044\u3046\u3048"]}