[Updated] D12440: crecord: add test demonstrating issue when reverting noeol->eol change

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Wed Apr 6 12:51:36 UTC 2022


Closed by commit rHG74444ac3b041: crecord: add test demonstrating issue when reverting noeol->eol change (authored by spectral).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12440?vs=32782&id=32816

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12440/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D12440

AFFECTED FILES
  tests/test-revert-interactive-curses.t

CHANGE DETAILS

diff --git a/tests/test-revert-interactive-curses.t b/tests/test-revert-interactive-curses.t
--- a/tests/test-revert-interactive-curses.t
+++ b/tests/test-revert-interactive-curses.t
@@ -1,4 +1,5 @@
 #require curses
+#testcases committed wdir
 
 Revert interactive tests with the Curses interface
 
@@ -12,6 +13,22 @@
 
 TODO: Make a curses version of the other tests from test-revert-interactive.t.
 
+#if committed
+  $ maybe_commit() {
+  >   hg ci "$@"
+  > }
+  $ do_revert() {
+  >   hg revert -ir'.^'
+  > }
+#else
+  $ maybe_commit() {
+  >   true
+  > }
+  $ do_revert() {
+  >   hg revert -i
+  > }
+#endif
+
 When a line without EOL is selected during "revert -i"
 
   $ hg init $TESTTMP/revert-i-curses-eol
@@ -19,7 +36,7 @@
   $ echo 0 > a
   $ hg ci -qAm 0
   $ printf 1 >> a
-  $ hg ci -qAm 1
+  $ maybe_commit -qAm 1
   $ cat a
   0
   1 (no-eol)
@@ -28,7 +45,7 @@
   > c
   > EOF
 
-  $ hg revert -ir'.^'
+  $ do_revert
   reverting a
   $ cat a
   0
@@ -40,7 +57,7 @@
   $ printf 0 > a
   $ hg ci -qAm 0
   $ echo 0 > a
-  $ hg ci -qAm 1
+  $ maybe_commit -qAm 1
   $ cat a
   0
 
@@ -48,8 +65,9 @@
   > c
   > EOF
 
-  $ hg revert -ir'.^'
+  $ do_revert
   reverting a
   $ cat a
+  0 (wdir known-bad-output !)
   0 (no-eol)
 



To: spectral, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220406/8c6cafa1/attachment-0002.html>


More information about the Mercurial-patches mailing list