[PATCH] rebase: turn rebaseskipobsolete on by default

Kostia Balytskyi ikostia at fb.com
Mon Mar 7 10:49:50 EST 2016


# HG changeset patch
# User Kostia Balytskyi <ikostia at fb.com>
# Date 1457365615 28800
#      Mon Mar 07 07:46:55 2016 -0800
# Node ID 9ebdb69bcb762c95c1f3c1a98416df656e672604
# Parent  ffd3ac07b1d79dda7f57bd826208fdaf92a76717
rebase: turn rebaseskipobsolete on by default

As per plan desribed in https://goo.gl/iMUKzY, we want to turn
rebaseskipobsolete on by default. Please note that issue4210
is not a blocker since we have a warning that will tell user
about the potential divergence now.

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -297,7 +297,8 @@ def rebase(ui, repo, **opts):
                     hint=_('use --keep to keep original changesets'))
 
             obsoletenotrebased = {}
-            if ui.configbool('experimental', 'rebaseskipobsolete'):
+            if ui.configbool('experimental',
+                             'rebaseskipobsolete', default=True):
                 rebasesetrevs = set(rebaseset)
                 rebaseobsrevs = _filterobsoleterevs(repo, rebasesetrevs)
                 obsoletenotrebased = _computeobsoletenotrebased(repo,
diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t
--- a/tests/test-rebase-obsolete.t
+++ b/tests/test-rebase-obsolete.t
@@ -527,7 +527,7 @@ Test hidden changesets in the rebase set
   $ hg commit -m J
   $ hg debugobsolete `hg log --rev . -T '{node}'`
 
-  $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback
+  $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off
   rebasing 9:4bde274eefcf "I"
   rebasing 13:06edfc82198f "J" (tip)
   $ hg log -G


More information about the Mercurial-devel mailing list