Mercurial > hg
changeset 45996:904647f7d983
rhg: add a test for --rev with a hex changeset ID
And fix error message formatting
Differential Revision: https://phab.mercurial-scm.org/D9478
author | Simon Sapin <simon-commits@exyr.org> |
---|---|
date | Mon, 30 Nov 2020 19:26:54 +0100 |
parents | 32dcd783a985 |
children | 7c539f0febbe |
files | rust/rhg/src/commands/cat.rs rust/rhg/src/commands/files.rs tests/test-rhg.t |
diffstat | 3 files changed, 22 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/rhg/src/commands/cat.rs Tue Dec 01 02:07:15 2020 +0100 +++ b/rust/rhg/src/commands/cat.rs Mon Nov 30 19:26:54 2020 +0100 @@ -70,7 +70,7 @@ )), CatRevErrorKind::InvalidRevision => CommandErrorKind::Abort(Some( utf8_to_local(&format!( - "abort: invalid revision identifier{}\n", + "abort: invalid revision identifier {}\n", rev )) .into(),
--- a/rust/rhg/src/commands/files.rs Tue Dec 01 02:07:15 2020 +0100 +++ b/rust/rhg/src/commands/files.rs Mon Nov 30 19:26:54 2020 +0100 @@ -85,7 +85,7 @@ ListRevTrackedFilesErrorKind::InvalidRevision => { CommandErrorKind::Abort(Some( utf8_to_local(&format!( - "abort: invalid revision identifier{}\n", + "abort: invalid revision identifier {}\n", rev )) .into(),
--- a/tests/test-rhg.t Tue Dec 01 02:07:15 2020 +0100 +++ b/tests/test-rhg.t Mon Nov 30 19:26:54 2020 +0100 @@ -116,6 +116,26 @@ $ rhg cat -r 1 copy_of_original original content +Specifying revisions by changeset ID + $ hg log + changeset: 1:41263439dc17 + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: add copy of original + + changeset: 0:1c9e69808da7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: add original + + $ rhg files -r 41263439dc17 + abort: invalid revision identifier 41263439dc17 + [255] + $ rhg cat -r 41263439dc17 original + abort: invalid revision identifier 41263439dc17 + [255] + Requirements $ rhg debugrequirements dotencode