diff tests/test-rebase-base.t @ 31558:13dc00c233b7

rebase: add flag to require destination In some mercurial workflows, the default destination for rebase does not always work well and can lead to confusing behavior. With this flag enabled, every rebase command will require passing an explicit destination, eliminating this confusion.
author Ryan McElroy <rmcelroy@fb.com>
date Tue, 14 Mar 2017 17:43:44 -0700
parents 51e7c83e05ee
children 37a0ad669051
line wrap: on
line diff
--- a/tests/test-rebase-base.t	Tue Mar 14 17:43:18 2017 -0700
+++ b/tests/test-rebase-base.t	Tue Mar 14 17:43:44 2017 -0700
@@ -391,3 +391,25 @@
    /
   o  0: A
   
+Require a destination
+  $ cat >> $HGRCPATH <<EOF
+  > [commands]
+  > rebase.requiredest = True
+  > EOF
+  $ hg init repo
+  $ cd repo
+  $ echo a >> a
+  $ hg commit -qAm aa
+  $ echo b >> b
+  $ hg commit -qAm bb
+  $ hg up ".^"
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo c >> c
+  $ hg commit -qAm cc
+  $ hg rebase
+  abort: you must specify a destination
+  (use: hg rebase -d REV)
+  [255]
+  $ hg rebase -d 1
+  rebasing 2:5db65b93a12b "cc" (tip)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/5db65b93a12b-4fb789ec-backup.hg (glob)