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

login
register
mail settings
Submitter phabricator
Date Dec. 14, 2019, 5:49 a.m.
Message ID <differential-rev-PHID-DREV-m2ejm2xkgyailmitdvgb-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43833/
State Superseded
Headers show

Comments

phabricator - Dec. 14, 2019, 5:49 a.m.
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




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

Patch

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