[Request] [+- ] D9478: rhg: add a test for --rev with a hex changeset ID
SimonSapin
phabricator at mercurial-scm.org
Tue Dec 1 18:27:56 UTC 2020
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
And fix error message formatting
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9478
AFFECTED FILES
rust/rhg/src/commands/cat.rs
rust/rhg/src/commands/files.rs
tests/test-rhg.t
CHANGE DETAILS
diff --git a/tests/test-rhg.t b/tests/test-rhg.t
--- a/tests/test-rhg.t
+++ b/tests/test-rhg.t
@@ -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
diff --git a/rust/rhg/src/commands/files.rs b/rust/rhg/src/commands/files.rs
--- a/rust/rhg/src/commands/files.rs
+++ b/rust/rhg/src/commands/files.rs
@@ -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(),
diff --git a/rust/rhg/src/commands/cat.rs b/rust/rhg/src/commands/cat.rs
--- a/rust/rhg/src/commands/cat.rs
+++ b/rust/rhg/src/commands/cat.rs
@@ -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(),
To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20201201/7857a53a/attachment.html>
More information about the Mercurial-patches
mailing list