changeset 5962:b68789e8c535

tests: spell out hg commands for readability These are the abbreviations that are used just in a couple of places in the tests. `hg d` is in my opinion an abbreviation of core command that everyone should know, but I'd rather not use "unofficial" abbreviations in tests because it takes a second to mentally expand what the command is when you're reading it. In CLI when you type commands, it makes sense to abbreviate things to type less. But tests are read much more often than they are written, so I'd like to apply the same guidelines to them as to regular code: readability first. Apart from readability, it's also consistency, because these particular abbreviations are rare, and everywhere else the commands are spelled out.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 17 Jun 2021 11:08:01 +0300
parents dad6bd8180d3
children c0b439f14260
files tests/test-evolve-content-divergent-stack.t tests/test-evolve-continue.t tests/test-issue-6028.t tests/test-prev-next.t tests/test-topic-flow-reject-untopiced.t tests/test-uncommit.t tests/test-unstable-orphan.t
diffstat 7 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-evolve-content-divergent-stack.t	Thu Jun 17 10:57:53 2021 +0300
+++ b/tests/test-evolve-content-divergent-stack.t	Thu Jun 17 11:08:01 2021 +0300
@@ -1149,14 +1149,14 @@
   o  0:bde1d2b6b5e5 added base
       () [default] draft
 
-  $ hg reb -r 10 -d 7
+  $ hg rebase -r 10 -d 7
   rebasing 10:9a1f460df8b5 "added dar"
   $ hg up 0 -q
   $ echo alpha > alpha
   $ hg ci -Am "added alpha"
   adding alpha
   created new head
-  $ hg reb -r 6 -d 'desc("added alpha")'
+  $ hg rebase -r 6 -d 'desc("added alpha")'
   rebasing 6:57a3f8edf065 "added dar"
   $ hg evolve --content-divergent
   skipping 8b68d5104188: have a different parent than cf9a46e19942 (not handled yet)
--- a/tests/test-evolve-continue.t	Thu Jun 17 10:57:53 2021 +0300
+++ b/tests/test-evolve-continue.t	Thu Jun 17 11:08:01 2021 +0300
@@ -473,7 +473,7 @@
   $ echo 2b > a
   $ hg amend -q
   1 new orphan changesets
-  $ hg ev -q
+  $ hg evolve -q
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   unresolved merge conflicts
   (see 'hg help evolve.interrupted')
--- a/tests/test-issue-6028.t	Thu Jun 17 10:57:53 2021 +0300
+++ b/tests/test-issue-6028.t	Thu Jun 17 11:08:01 2021 +0300
@@ -155,7 +155,7 @@
 
 test that we successfully got rid of the bad file
 
-  $ hg d --git -r 'predecessors(.)' -r '.'
+  $ hg diff --git -r 'predecessors(.)' -r '.'
   diff --git a/a_bad_commit b/a_bad_commit
   deleted file mode 100644
   --- a/a_bad_commit
--- a/tests/test-prev-next.t	Thu Jun 17 10:57:53 2021 +0300
+++ b/tests/test-prev-next.t	Thu Jun 17 11:08:01 2021 +0300
@@ -229,7 +229,7 @@
 
 next with ambiguity in aspiring children
 
-  $ hg am -m 'added b (3)'
+  $ hg amend -m 'added b (3)'
   2 new orphan changesets
   $ hg next --no-evolve
   no children
--- a/tests/test-topic-flow-reject-untopiced.t	Thu Jun 17 10:57:53 2021 +0300
+++ b/tests/test-topic-flow-reject-untopiced.t	Thu Jun 17 11:08:01 2021 +0300
@@ -17,7 +17,7 @@
   $ hg topic server
   marked working directory as topic: server
   $ for ch in a b c; do echo foo > $ch; hg ci -Aqm "Added "$ch; done
-  $ hg ph -p 0
+  $ hg phase -p 0
 
   $ hg log -G -T "{rev}:{node|short}\n{desc}  {topics}"
   @  2:a7b96f87a214
--- a/tests/test-uncommit.t	Thu Jun 17 10:57:53 2021 +0300
+++ b/tests/test-uncommit.t	Thu Jun 17 11:08:01 2021 +0300
@@ -105,7 +105,7 @@
   R g
   R m
   R n
-  $ hg man -r .
+  $ hg manifest -r .
   a
   aa
   b
@@ -203,7 +203,7 @@
   M d
   A e
   R n
-  $ hg man -r .
+  $ hg manifest -r .
   a
   b
   c
--- a/tests/test-unstable-orphan.t	Thu Jun 17 10:57:53 2021 +0300
+++ b/tests/test-unstable-orphan.t	Thu Jun 17 11:08:01 2021 +0300
@@ -51,7 +51,7 @@
   o  0:135f39f4bd78@default(draft) add _a
   
 
-  $ hg evo --all --any --orphan
+  $ hg evolve --all --any --orphan
   move:[2] add _c
   atop:[3] bprime
   $ hg log -G
@@ -102,7 +102,7 @@
   o  0:135f39f4bd78@default(draft) add _a
   
 
-  $ hg evo --all --any --orphan
+  $ hg evolve --all --any --orphan
   move:[2] add _c
   atop:[6] add bsecondsplit2
   $ hg log -G