[PATCH 1 of 6] rebase: move destination test to new test file

Ryan McElroy rm at fb.com
Tue Mar 28 21:31:10 UTC 2017


# HG changeset patch
# User Ryan McElroy <rmcelroy at fb.com>
# Date 1490733768 25200
#      Tue Mar 28 13:42:48 2017 -0700
# Node ID a10ea0843904718f724cfb1bd3c3db143c794921
# Parent  e86eb75e74ce1b0803c26d86a229b9b711f6d76a
rebase: move destination test to new test file

We'll be adding a lot more tests here, so it makes sense to have this in its
own file now.

diff --git a/tests/test-rebase-base.t b/tests/test-rebase-base.t
--- a/tests/test-rebase-base.t
+++ b/tests/test-rebase-base.t
@@ -391,33 +391,3 @@ Multiple roots. Two children share two p
    /
   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)
-  $ hg rebase -d 0 -r . -q
-  $ HGPLAIN=1 hg rebase
-  rebasing 2:889b0bc6a730 "cc" (tip)
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-backup.hg (glob)
-  $ hg rebase -d 0 -r . -q
-  $ hg --config commands.rebase.requiredest=False rebase
-  rebasing 2:279de9495438 "cc" (tip)
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-backup.hg (glob)
diff --git a/tests/test-rebase-dest.t b/tests/test-rebase-dest.t
new file mode 100644
--- /dev/null
+++ b/tests/test-rebase-dest.t
@@ -0,0 +1,33 @@
+Require a destination
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > rebase =
+  > [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)
+  $ hg rebase -d 0 -r . -q
+  $ HGPLAIN=1 hg rebase
+  rebasing 2:889b0bc6a730 "cc" (tip)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-backup.hg (glob)
+  $ hg rebase -d 0 -r . -q
+  $ hg --config commands.rebase.requiredest=False rebase
+  rebasing 2:279de9495438 "cc" (tip)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-backup.hg (glob)
+


More information about the Mercurial-devel mailing list