Dan Villiom Podlaski Christiansen avatar Dan Villiom Podlaski Christiansen committed a547464

gdown/gup: add next/previous alias

Up and down refer to the customary order in log output rather than
concepts; as such, it may be confusing to the user. I for one found
them suprising -- they just didn't fit with my mental model.

Previous and next, however, imply a clear parent/child relationship.

We attroduce the new name as aliases for now.

Comments (0)

Files changed (3)

 - parents command: add "working directory parent is obsolete" message
 - evolve command: allow updating to the successor if the parent is
   obsolete
+- gdown and gup commands: add next and previous alias, respectively
 
 3.1.0 -- 2013-02-11
 
 
 shorttemplate = '[{rev}] {desc|firstline}\n'
 
-@command('^gdown',
+@command('^gdown|previous',
          [],
          '')
-def cmdgdown(ui, repo):
+def cmdprevious(ui, repo):
     """update to parent and display summary lines"""
     wkctx = repo[None]
     wparents = wkctx.parents()
         ui.warn(_('multiple parents, explicitly update to one\n'))
         return 1
 
-@command('^gup',
+@command('^gup|next',
          [],
          '')
-def cmdup(ui, repo):
+def cmdnext(ui, repo):
     """update to child and display summary lines"""
     wkctx = repo[None]
     wparents = wkctx.parents()

tests/test-uncommit.t

   $ hg ci -m touncommit
   $ echo unrelated > unrelated
   $ hg ci -Am addunrelated unrelated
-  $ hg gdown
+  $ hg previous
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   [8] touncommit
   $ hg uncommit aa
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.