Patchwork [3,of,3] rebase: more consistent and prioritized ordering of documentation for revs

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 17, 2016, 6:33 p.m.
Message ID <87e0600fbf9694a12416.1453055612@madski>
Download mbox | patch
Permalink /patch/12815/
State Deferred
Headers show

Comments

Mads Kiilerich - Jan. 17, 2016, 6:33 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1453055582 -3600
#      Sun Jan 17 19:33:02 2016 +0100
# Node ID 87e0600fbf9694a12416c99801313547e5ea8d0a
# Parent  0b62abed95818a2e6b3dbdbaa9bf85f1ec5b7194
rebase: more consistent and prioritized ordering of documentation for revs

Consistently mention the options for specifying the revisions to graft in the
same order: --rev, --base and --source.

--source is rarely the best option with its "slightly but not sufficiently"
magic behaviour. (It is fully covered by --rev REV:: and could perhaps be
deprecated.)

--rev is the most explicit and thus perhaps the simplest option for new users -
it is thus mentioned first.

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -80,14 +80,14 @@  def _revsetdestrebase(repo, subset, x):
     return subset & revset.baseset([_destrebase(repo)])
 
 @command('rebase',
-    [('s', 'source', '',
-     _('rebase the specified changeset and descendants'), _('REV')),
+    [('r', 'rev', [],
+     _('rebase these revisions'),
+     _('REV')),
     ('b', 'base', '',
      _('rebase everything from branching point of specified changeset'),
      _('REV')),
-    ('r', 'rev', [],
-     _('rebase these revisions'),
-     _('REV')),
+    ('s', 'source', '',
+     _('rebase the specified changeset and descendants'), _('REV')),
     ('d', 'dest', '',
      _('rebase onto the specified changeset'), _('REV')),
     ('', 'collapse', False, _('collapse the rebased changesets')),
@@ -125,12 +125,12 @@  def rebase(ui, repo, **opts):
 
       1. Explicitly select them using ``--rev``.
 
-      2. Use ``--source`` to select a root changeset and include all of its
+      2. Use ``--base`` to select a changeset; rebase will find ancestors
+      and their descendants which are not also ancestors of the destination.
+
+      3. Use ``--source`` to select a root changeset and include all of its
       descendants.
 
-      3. Use ``--base`` to select a changeset; rebase will find ancestors
-      and their descendants which are not also ancestors of the destination.
-
     Rebase will destroy original changesets unless you use ``--keep``.
     It will also move your bookmarks (even if you do).