[PATCH] rebase: add short -k option for --keep

Nat Mote nmote at fb.com
Tue May 12 23:22:26 UTC 2015


# HG changeset patch
# User Nat Mote <nmote at fb.com>
# Date 1431468259 25200
#      Tue May 12 15:04:19 2015 -0700
# Node ID f7ce8235008ada8fd7237da39ed61c6af99c5965
# Parent  015adbcd92f3bc15305a3ed4ee59676ff358eabf
rebase: add short -k option for --keep

histedit and strip already have a short option for keep, so this makes the
interface more consistent

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -67,7 +67,7 @@
     ('e', 'edit', False, _('invoke editor on commit messages')),
     ('l', 'logfile', '',
      _('read collapse commit message from file'), _('FILE')),
-    ('', 'keep', False, _('keep original changesets')),
+    ('k', 'keep', False, _('keep original changesets')),
     ('', 'keepbranches', False, _('keep original branch names')),
     ('D', 'detach', False, _('(DEPRECATED)')),
     ('i', 'interactive', False, _('(DEPRECATED)')),
diff --git a/tests/test-rebase-scenario-global.t b/tests/test-rebase-scenario-global.t
--- a/tests/test-rebase-scenario-global.t
+++ b/tests/test-rebase-scenario-global.t
@@ -397,7 +397,7 @@
   abort: can't remove original changesets with unrebased descendants
   (use --keep to keep original changesets)
   [255]
-  $ hg rebase -r '2::8' -d 1 --keep
+  $ hg rebase -r '2::8' -d 1 -k
   rebasing 2:c9e50f6cdc55 "C"
   rebasing 3:ffd453c31098 "D"
   rebasing 6:3d8a618087a7 "G"


More information about the Mercurial-devel mailing list