Commits

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