Patchwork [2,of,3,evolve-ext] evolve: deprecate gup and gdown aliases

login
register
mail settings
Submitter Olle Lundberg
Date April 3, 2014, 11:12 p.m.
Message ID <ac1f02bd74ba20877ad2.1396566754@se-c02kq0dadr55.lan>
Download mbox | patch
Permalink /patch/4216/
State Not Applicable
Headers show

Comments

Olle Lundberg - April 3, 2014, 11:12 p.m.
# HG changeset patch
# User Olle Lundberg <geek@nerd.sh>
# Date 1396565895 -7200
#      Fri Apr 04 00:58:15 2014 +0200
# Node ID ac1f02bd74ba20877ad2c2a4c47b7ddd880065f0
# Parent  a9f23a90d373622bbf9d44d929ecbdd3c02d6a3e
evolve: deprecate gup and gdown aliases

This is done in an effort to clean up the UI of evolve.

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -903,10 +903,14 @@ 
         util.checksignature(fn)(*args, **kwargs)
     newfn.__doc__  = deprecationwarning
     cmdwrapper = command(oldalias, opts, synopsis)
     cmdwrapper(newfn)
 
+@eh.extsetup
+def deprecatealiases(ui):
+    _deprecatealias('gup', 'next')
+    _deprecatealias('gdown', 'previous')
 
 @command('debugrecordpruneparents', [], '')
 def cmddebugrecordpruneparents(ui, repo):
     """add parents data to prune markers when possible
 
@@ -1516,11 +1520,11 @@ 
 
 
 
 shorttemplate = '[{rev}] {desc|firstline}\n'
 
-@command('^gdown|previous',
+@command('^previous',
          [],
          '')
 def cmdprevious(ui, repo):
     """update to parent and display summary lines"""
     wkctx = repo[None]
@@ -1539,11 +1543,11 @@ 
         for p in parents:
             displayer.show(p)
         ui.warn(_('multiple parents, explicitly update to one\n'))
         return 1
 
-@command('^gup|next',
+@command('^next',
          [],
          '')
 def cmdnext(ui, repo):
     """update to child and display summary lines"""
     wkctx = repo[None]
diff --git a/tests/test-stabilize-conflict.t b/tests/test-stabilize-conflict.t
--- a/tests/test-stabilize-conflict.t
+++ b/tests/test-stabilize-conflict.t
@@ -57,10 +57,11 @@ 
 
 proper behavior without conflict
 ----------------------------------
 
   $ hg gdown
+  gdown have been deprecated in favor of previous
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [1] babar count up to ten
   $ safesed 's/huit/eight/' babar
   $ hg diff
   diff -r 9d5daf8bd956 babar
@@ -103,10 +104,11 @@ 
 
 proper behavior with conflict using internal:merge
 --------------------------------------------------
 
   $ hg gdown
+  gdown have been deprecated in favor of previous
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [4] babar count up to ten
   $ safesed 's/dix/ten/' babar
   $ hg diff
   diff -r 5977072d13c5 babar
@@ -187,10 +189,11 @@ 
 -----------------------------------------------------------
 
   $ safesed 's/merge=.*/merge=touch/' $HGRCPATH
   $ safesed 's/touch.gui=.*/touch.gui=false/' $HGRCPATH
   $ hg gdown
+  gdown have been deprecated in favor of previous
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [7] babar count up to ten
   $ safesed 's/ten/zehn/' babar
   $ hg diff
   diff -r e04690b09bc6 babar
diff --git a/tests/test-stabilize-order.t b/tests/test-stabilize-order.t
--- a/tests/test-stabilize-order.t
+++ b/tests/test-stabilize-order.t
@@ -33,16 +33,18 @@ 
   o  1:93418d2c0979@default(draft) adda
   |
   o  0:c471ef929e6a@default(draft) addroot
   
   $ hg gdown
+  gdown have been deprecated in favor of previous
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   [2] addb
   $ echo b >> b
   $ hg amend
   1 new unstable changesets
   $ hg gdown
+  gdown have been deprecated in favor of previous
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   [1] adda
   $ echo a >> a
   $ hg amend
   1 new unstable changesets
diff --git a/tests/test-stabilize-result.t b/tests/test-stabilize-result.t
--- a/tests/test-stabilize-result.t
+++ b/tests/test-stabilize-result.t
@@ -62,10 +62,11 @@ 
    a
   +a
   $ echo 'newer a' >> a
   $ hg ci -m 'newer a'
   $ hg gdown
+  gdown have been deprecated in favor of previous
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [4] changea
   $ echo 'a' > a
   $ hg amend
   1 new unstable changesets
@@ -109,10 +110,11 @@ 
   o  0:07f494440405@default(draft) bk:[] adda
   
 Add another commit
 
   $ hg gdown
+  gdown have been deprecated in favor of previous
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [7] changea
   $ echo 'c' > c
   $ hg add c
   $ hg commit -m 'add c'