D7666: update: add some tests for the status quo of morestatus on update conflicts

rdamazio (Rodrigo Damazio Bovendorp) phabricator at mercurial-scm.org
Sat Dec 14 05:49:26 UTC 2019


rdamazio created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-update-branches.t

CHANGE DETAILS

diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
--- a/tests/test-update-branches.t
+++ b/tests/test-update-branches.t
@@ -1,3 +1,8 @@
+  $ cat >> $HGRCPATH <<EOF
+  > [commands]
+  > status.verbose=1
+  > EOF
+
 # Construct the following history tree:
 #
 # @  5:e1bb631146ca  b1
@@ -308,6 +313,10 @@
   use 'hg resolve' to retry unresolved file merges
   [1]
   $ rm a.orig
+  $ hg status
+  M a
+  $ hg resolve -l
+  U a
 
 Change/delete conflict is not allowed
   $ hg up -qC 3
@@ -536,10 +545,47 @@
   updated to hidden changeset 6efa171f091b
   (hidden revision '6efa171f091b' was rewritten as: d047485b3896)
   [1]
+
+Test that statuses are reported properly before and after merge resolution.
+  $ rm a.orig
+  $ hg resolve -l
+  U a
+  $ hg status
+  M a
+  M foo
+
   $ hg revert -r . a
+
+  $ rm a.orig
+  $ hg resolve -l
+  U a
+  $ hg status
+  M foo
+  $ hg status -Tjson
+  [
+   {
+    "itemtype": "file",
+    "path": "foo",
+    "status": "M"
+   }
+  ]
+
   $ hg resolve -m
   (no more unresolved files)
 
+  $ hg resolve -l
+  R a
+  $ hg status
+  M foo
+  $ hg status -Tjson
+  [
+   {
+    "itemtype": "file",
+    "path": "foo",
+    "status": "M"
+   }
+  ]
+
 Test that 4 is detected as the no-argument destination from 3 and also moves
 the bookmark with it
   $ hg up --quiet 0          # we should be able to update to 3 directly



To: rdamazio, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list