D3628: status: add default of --terse=u to tweakdefaults (BC)

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sun May 20 05:57:58 UTC 2018


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

REVISION SUMMARY
  This is in line with both Git and Subversion, and strikes me as a more
  humane behavior.
  
  Test output changes are expected once you read test-status.t, and I
  feel like we've still got adequate coverage on things.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/ui.py
  tests/test-status.t

CHANGE DETAILS

diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -109,11 +109,8 @@
 
 tweaking defaults works
   $ hg status --cwd a --config ui.tweakdefaults=yes
-  ? 1/in_a_1
-  ? in_a
-  ? ../b/1/in_b_1
-  ? ../b/2/in_b_2
-  ? ../b/in_b
+  ? .
+  ? ../b/
   ? ../in_root
   $ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes
   ? a/1/in_a_1 (glob)
@@ -123,11 +120,8 @@
   ? b/in_b (glob)
   ? in_root
   $ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes
-  ? 1/in_a_1 (glob)
-  ? in_a
-  ? ../b/1/in_b_1 (glob)
-  ? ../b/2/in_b_2 (glob)
-  ? ../b/in_b (glob)
+  ? .
+  ? ../b/
   ? ../in_root (glob)
 
 relative paths can be requested
@@ -157,11 +151,8 @@
   > status.relative = False
   > EOF
   $ hg status --cwd a --config ui.tweakdefaults=yes
-  ? a/1/in_a_1
-  ? a/in_a
-  ? b/1/in_b_1
-  ? b/2/in_b_2
-  ? b/in_b
+  ? a/
+  ? b/
   ? in_root
 
   $ cd ..
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -66,6 +66,8 @@
 update.check = noconflict
 # Show conflicts information in `hg status`
 status.verbose = True
+# Collapse entire directories that contain only unknown files
+status.terse = u
 
 [diff]
 git = 1



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


More information about the Mercurial-devel mailing list