[PATCH 1 of 2] show: rename "underway" to "work"

Gregory Szorc gregory.szorc at gmail.com
Tue Apr 18 18:21:48 UTC 2017


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1492537786 25200
#      Tue Apr 18 10:49:46 2017 -0700
# Node ID d8d4b4acc68859f90f8759309803b116b67a9371
# Parent  ed42e00a5c4ec7a3bebaec699ef934429cdc2ddd
show: rename "underway" to "work"

Durham and I both like this better than "underway." We can add aliases
and bikeshed on the name during the 4.3 cycle, as this whole extension is
highly experimental.

diff --git a/hgext/show.py b/hgext/show.py
--- a/hgext/show.py
+++ b/hgext/show.py
@@ -189,8 +189,8 @@ def underwayrevset(repo, subset, x):
 
     return subset & relevant
 
- at showview('underway', fmtopic='underway')
-def showunderway(ui, repo, fm):
+ at showview('work', fmtopic='work')
+def showwork(ui, repo, fm):
     """changesets that aren't finished"""
     # TODO support date-based limiting when calling revset.
     revs = repo.revs('sort(_underway(), topo)')
diff --git a/mercurial/templates/map-cmdline.show b/mercurial/templates/map-cmdline.show
--- a/mercurial/templates/map-cmdline.show
+++ b/mercurial/templates/map-cmdline.show
@@ -1,3 +1,3 @@
 # TODO add label() once we figure out which namespace the labels belong on.
 showbookmarks = '{if(active, "*", " ")} {pad(bookmark, longestbookmarklen + 4)}{shortest(node, 5)}\n'
-showunderway = '{shortest(node, 5)}{if(branches, " ({branch})")}{if(bookmarks, " ({bookmarks})")} {desc|firstline}'
+showwork = '{shortest(node, 5)}{if(branches, " ({branch})")}{if(bookmarks, " ({bookmarks})")} {desc|firstline}'
diff --git a/tests/test-show-underway.t b/tests/test-show-work.t
rename from tests/test-show-underway.t
rename to tests/test-show-work.t
--- a/tests/test-show-underway.t
+++ b/tests/test-show-work.t
@@ -8,27 +8,27 @@
 
 Command works on an empty repo
 
-  $ hg show underway
+  $ hg show work
 
 Single draft changeset shown
 
   $ echo 0 > foo
   $ hg -q commit -A -m 'commit 0'
 
-  $ hg show underway
+  $ hg show work
   @  9f171 commit 0
 
 Even when it isn't the wdir
 
   $ hg -q up null
 
-  $ hg show underway
+  $ hg show work
   o  9f171 commit 0
 
 Single changeset is still there when public because it is a head
 
   $ hg phase --public -r 0
-  $ hg show underway
+  $ hg show work
   o  9f171 commit 0
 
 A draft child will show both it and public parent
@@ -37,7 +37,7 @@ A draft child will show both it and publ
   $ echo 1 > foo
   $ hg commit -m 'commit 1'
 
-  $ hg show underway
+  $ hg show work
   @  181cc commit 1
   o  9f171 commit 0
 
@@ -46,7 +46,7 @@ Multiple draft children will be shown
   $ echo 2 > foo
   $ hg commit -m 'commit 2'
 
-  $ hg show underway
+  $ hg show work
   @  128c8 commit 2
   o  181cc commit 1
   o  9f171 commit 0
@@ -54,7 +54,7 @@ Multiple draft children will be shown
 Bumping first draft changeset to public will hide its parent
 
   $ hg phase --public -r 1
-  $ hg show underway
+  $ hg show work
   @  128c8 commit 2
   o  181cc commit 1
   |
@@ -67,7 +67,7 @@ Multiple DAG heads will be shown
   $ hg commit -m 'commit 3'
   created new head
 
-  $ hg show underway
+  $ hg show work
   @  f0abc commit 3
   | o  128c8 commit 2
   |/
@@ -79,7 +79,7 @@ Even when wdir is something else
 
   $ hg -q up null
 
-  $ hg show underway
+  $ hg show work
   o  f0abc commit 3
   | o  128c8 commit 2
   |/
@@ -94,7 +94,7 @@ Draft child shows public head (multiple 
   $ hg commit -m 'commit 4'
   created new head
 
-  $ hg show underway
+  $ hg show work
   @  668ca commit 4
   | o  f0abc commit 3
   | | o  128c8 commit 2
@@ -125,7 +125,7 @@ Branch name appears in output
   $ echo 4 > foo
   $ hg commit -m 'commit 4'
 
-  $ hg show underway
+  $ hg show work
   @  f8dd3 (mybranch) commit 4
   o  90cfc (mybranch) commit 3
   | o  128c8 commit 2
@@ -156,7 +156,7 @@ Bookmark name appears in output
   $ hg commit -m 'commit 4'
   $ hg bookmark mybook
 
-  $ hg show underway
+  $ hg show work
   @  cac82 (mybook) commit 4
   o  f0abc commit 3
   | o  128c8 (@) commit 2
diff --git a/tests/test-show.t b/tests/test-show.t
--- a/tests/test-show.t
+++ b/tests/test-show.t
@@ -11,7 +11,7 @@ No arguments shows available views
   available views:
   
   bookmarks -- bookmarks and their associated changeset
-  underway -- changesets that aren't finished
+  work -- changesets that aren't finished
   
   abort: no view requested
   (use "hg show VIEW" to choose a view)
@@ -40,7 +40,7 @@ No arguments shows available views
   
       bookmarks   bookmarks and their associated changeset
   
-      underway    changesets that aren't finished
+      work        changesets that aren't finished
   
   (use 'hg help -e show' to show help for the show extension)
   


More information about the Mercurial-devel mailing list