changeset 32058:0bb157bebb43 stable

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 18 Apr 2017 10:49:46 -0700
parents e5ffc91a2276
children 0ea1d9a750da
files hgext/show.py mercurial/templates/map-cmdline.show tests/test-show-underway.t tests/test-show-work.t tests/test-show.t
diffstat 5 files changed, 173 insertions(+), 173 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/show.py	Thu Apr 20 17:18:08 2017 -0700
+++ b/hgext/show.py	Tue Apr 18 10:49:46 2017 -0700
@@ -189,8 +189,8 @@
 
     return subset & relevant
 
-@showview('underway', fmtopic='underway')
-def showunderway(ui, repo, fm):
+@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)')
--- a/mercurial/templates/map-cmdline.show	Thu Apr 20 17:18:08 2017 -0700
+++ b/mercurial/templates/map-cmdline.show	Tue Apr 18 10:49:46 2017 -0700
@@ -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}'
--- a/tests/test-show-underway.t	Thu Apr 20 17:18:08 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-  $ cat >> $HGRCPATH << EOF
-  > [extensions]
-  > show =
-  > EOF
-
-  $ hg init repo0
-  $ cd repo0
-
-Command works on an empty repo
-
-  $ hg show underway
-
-Single draft changeset shown
-
-  $ echo 0 > foo
-  $ hg -q commit -A -m 'commit 0'
-
-  $ hg show underway
-  @  9f171 commit 0
-
-Even when it isn't the wdir
-
-  $ hg -q up null
-
-  $ hg show underway
-  o  9f171 commit 0
-
-Single changeset is still there when public because it is a head
-
-  $ hg phase --public -r 0
-  $ hg show underway
-  o  9f171 commit 0
-
-A draft child will show both it and public parent
-
-  $ hg -q up 0
-  $ echo 1 > foo
-  $ hg commit -m 'commit 1'
-
-  $ hg show underway
-  @  181cc commit 1
-  o  9f171 commit 0
-
-Multiple draft children will be shown
-
-  $ echo 2 > foo
-  $ hg commit -m 'commit 2'
-
-  $ hg show underway
-  @  128c8 commit 2
-  o  181cc commit 1
-  o  9f171 commit 0
-
-Bumping first draft changeset to public will hide its parent
-
-  $ hg phase --public -r 1
-  $ hg show underway
-  @  128c8 commit 2
-  o  181cc commit 1
-  |
-  ~
-
-Multiple DAG heads will be shown
-
-  $ hg -q up -r 1
-  $ echo 3 > foo
-  $ hg commit -m 'commit 3'
-  created new head
-
-  $ hg show underway
-  @  f0abc commit 3
-  | o  128c8 commit 2
-  |/
-  o  181cc commit 1
-  |
-  ~
-
-Even when wdir is something else
-
-  $ hg -q up null
-
-  $ hg show underway
-  o  f0abc commit 3
-  | o  128c8 commit 2
-  |/
-  o  181cc commit 1
-  |
-  ~
-
-Draft child shows public head (multiple heads)
-
-  $ hg -q up 0
-  $ echo 4 > foo
-  $ hg commit -m 'commit 4'
-  created new head
-
-  $ hg show underway
-  @  668ca commit 4
-  | o  f0abc commit 3
-  | | o  128c8 commit 2
-  | |/
-  | o  181cc commit 1
-  |/
-  o  9f171 commit 0
-
-  $ cd ..
-
-Branch name appears in output
-
-  $ hg init branches
-  $ cd branches
-  $ echo 0 > foo
-  $ hg -q commit -A -m 'commit 0'
-  $ echo 1 > foo
-  $ hg commit -m 'commit 1'
-  $ echo 2 > foo
-  $ hg commit -m 'commit 2'
-  $ hg phase --public -r .
-  $ hg -q up -r 1
-  $ hg branch mybranch
-  marked working directory as branch mybranch
-  (branches are permanent and global, did you want a bookmark?)
-  $ echo 3 > foo
-  $ hg commit -m 'commit 3'
-  $ echo 4 > foo
-  $ hg commit -m 'commit 4'
-
-  $ hg show underway
-  @  f8dd3 (mybranch) commit 4
-  o  90cfc (mybranch) commit 3
-  | o  128c8 commit 2
-  |/
-  o  181cc commit 1
-  |
-  ~
-
-  $ cd ..
-
-Bookmark name appears in output
-
-  $ hg init bookmarks
-  $ cd bookmarks
-  $ echo 0 > foo
-  $ hg -q commit -A -m 'commit 0'
-  $ echo 1 > foo
-  $ hg commit -m 'commit 1'
-  $ echo 2 > foo
-  $ hg commit -m 'commit 2'
-  $ hg phase --public -r .
-  $ hg bookmark @
-  $ hg -q up -r 1
-  $ echo 3 > foo
-  $ hg commit -m 'commit 3'
-  created new head
-  $ echo 4 > foo
-  $ hg commit -m 'commit 4'
-  $ hg bookmark mybook
-
-  $ hg show underway
-  @  cac82 (mybook) commit 4
-  o  f0abc commit 3
-  | o  128c8 (@) commit 2
-  |/
-  o  181cc commit 1
-  |
-  ~
-
-  $ cd ..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-show-work.t	Tue Apr 18 10:49:46 2017 -0700
@@ -0,0 +1,168 @@
+  $ cat >> $HGRCPATH << EOF
+  > [extensions]
+  > show =
+  > EOF
+
+  $ hg init repo0
+  $ cd repo0
+
+Command works on an empty repo
+
+  $ hg show work
+
+Single draft changeset shown
+
+  $ echo 0 > foo
+  $ hg -q commit -A -m 'commit 0'
+
+  $ hg show work
+  @  9f171 commit 0
+
+Even when it isn't the wdir
+
+  $ hg -q up null
+
+  $ 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 work
+  o  9f171 commit 0
+
+A draft child will show both it and public parent
+
+  $ hg -q up 0
+  $ echo 1 > foo
+  $ hg commit -m 'commit 1'
+
+  $ hg show work
+  @  181cc commit 1
+  o  9f171 commit 0
+
+Multiple draft children will be shown
+
+  $ echo 2 > foo
+  $ hg commit -m 'commit 2'
+
+  $ hg show work
+  @  128c8 commit 2
+  o  181cc commit 1
+  o  9f171 commit 0
+
+Bumping first draft changeset to public will hide its parent
+
+  $ hg phase --public -r 1
+  $ hg show work
+  @  128c8 commit 2
+  o  181cc commit 1
+  |
+  ~
+
+Multiple DAG heads will be shown
+
+  $ hg -q up -r 1
+  $ echo 3 > foo
+  $ hg commit -m 'commit 3'
+  created new head
+
+  $ hg show work
+  @  f0abc commit 3
+  | o  128c8 commit 2
+  |/
+  o  181cc commit 1
+  |
+  ~
+
+Even when wdir is something else
+
+  $ hg -q up null
+
+  $ hg show work
+  o  f0abc commit 3
+  | o  128c8 commit 2
+  |/
+  o  181cc commit 1
+  |
+  ~
+
+Draft child shows public head (multiple heads)
+
+  $ hg -q up 0
+  $ echo 4 > foo
+  $ hg commit -m 'commit 4'
+  created new head
+
+  $ hg show work
+  @  668ca commit 4
+  | o  f0abc commit 3
+  | | o  128c8 commit 2
+  | |/
+  | o  181cc commit 1
+  |/
+  o  9f171 commit 0
+
+  $ cd ..
+
+Branch name appears in output
+
+  $ hg init branches
+  $ cd branches
+  $ echo 0 > foo
+  $ hg -q commit -A -m 'commit 0'
+  $ echo 1 > foo
+  $ hg commit -m 'commit 1'
+  $ echo 2 > foo
+  $ hg commit -m 'commit 2'
+  $ hg phase --public -r .
+  $ hg -q up -r 1
+  $ hg branch mybranch
+  marked working directory as branch mybranch
+  (branches are permanent and global, did you want a bookmark?)
+  $ echo 3 > foo
+  $ hg commit -m 'commit 3'
+  $ echo 4 > foo
+  $ hg commit -m 'commit 4'
+
+  $ hg show work
+  @  f8dd3 (mybranch) commit 4
+  o  90cfc (mybranch) commit 3
+  | o  128c8 commit 2
+  |/
+  o  181cc commit 1
+  |
+  ~
+
+  $ cd ..
+
+Bookmark name appears in output
+
+  $ hg init bookmarks
+  $ cd bookmarks
+  $ echo 0 > foo
+  $ hg -q commit -A -m 'commit 0'
+  $ echo 1 > foo
+  $ hg commit -m 'commit 1'
+  $ echo 2 > foo
+  $ hg commit -m 'commit 2'
+  $ hg phase --public -r .
+  $ hg bookmark @
+  $ hg -q up -r 1
+  $ echo 3 > foo
+  $ hg commit -m 'commit 3'
+  created new head
+  $ echo 4 > foo
+  $ hg commit -m 'commit 4'
+  $ hg bookmark mybook
+
+  $ hg show work
+  @  cac82 (mybook) commit 4
+  o  f0abc commit 3
+  | o  128c8 (@) commit 2
+  |/
+  o  181cc commit 1
+  |
+  ~
+
+  $ cd ..
--- a/tests/test-show.t	Thu Apr 20 17:18:08 2017 -0700
+++ b/tests/test-show.t	Tue Apr 18 10:49:46 2017 -0700
@@ -11,7 +11,7 @@
   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 @@
   
       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)