[PATCH 3 of 3] destutil: show messages at updating to the closed head as warning

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Fri Mar 25 21:57:37 EDT 2016


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1458957211 -32400
#      Sat Mar 26 10:53:31 2016 +0900
# Node ID 4d090f9af6a2d7d238fb7f5ef38601f089e7a2a2
# Parent  38fff615b9baa28152cc346e90b5cc2927aae7ec
destutil: show messages at updating to the closed head as warning

diff --git a/mercurial/destutil.py b/mercurial/destutil.py
--- a/mercurial/destutil.py
+++ b/mercurial/destutil.py
@@ -397,7 +397,7 @@ def _statusotherbranchheads(ui, repo):
         #  ========= ==========
         otherheads = repo.revs('%ln - parents()', heads)
         if repo['.'].closesbranch():
-            ui.status(_('no open descendant branch heads, '
+            ui.warn(_('warning: no open descendant branch heads, '
                         'updating to a closed head\n'
                         '(committing will reopen the branch)\n'))
             if otherheads:
diff --git a/tests/test-convert-mtn.t b/tests/test-convert-mtn.t
--- a/tests/test-convert-mtn.t
+++ b/tests/test-convert-mtn.t
@@ -260,7 +260,7 @@ convert incrementally
   $ cd repo.mtn-hg
   $ hg up -C
   12 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  no open descendant branch heads, updating to a closed head
+  warning: no open descendant branch heads, updating to a closed head
   (committing will reopen the branch)
   all heads for branch "com.selenic.test" are closed.
   $ glog
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
@@ -194,7 +194,7 @@ if on the closed branch head:
   $ hg commit --close-branch -m 6
   $ norevtest "on closed branch head" clean 6
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  no open descendant branch heads, updating to a closed head
+  warning: no open descendant branch heads, updating to a closed head
   (committing will reopen the branch)
   1 other heads for branch "default"
   parent=6
@@ -214,7 +214,7 @@ if all descendant branch heads are close
 
   $ norevtest "all descendant branch heads are closed" clean 3
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  no open descendant branch heads, updating to a closed head
+  warning: no open descendant branch heads, updating to a closed head
   (committing will reopen the branch)
   1 other heads for branch "default"
   parent=6
@@ -230,7 +230,7 @@ if on the closed branch head:
   $ hg commit --close-branch -m 7
   $ norevtest "all heads of branch default are closed" clean 6
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  no open descendant branch heads, updating to a closed head
+  warning: no open descendant branch heads, updating to a closed head
   (committing will reopen the branch)
   all heads for branch "default" are closed.
   parent=6
@@ -242,7 +242,7 @@ if not on the closed branch head:
 
   $ norevtest "all heads of branch default are closed" clean 1
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  no open descendant branch heads, updating to a closed head
+  warning: no open descendant branch heads, updating to a closed head
   (committing will reopen the branch)
   all heads for branch "default" are closed.
   parent=7
@@ -286,7 +286,7 @@ if all branch heads are closed
 
   $ norevtest "all branches are closed" clean null
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  no open descendant branch heads, updating to a closed head
+  warning: no open descendant branch heads, updating to a closed head
   (committing will reopen the branch)
   all heads for branch "foobar" are closed.
   parent=4


More information about the Mercurial-devel mailing list