Patchwork [1,of,5,v2] rebase: move destination test to new test file

login
register
mail settings
Submitter Ryan McElroy
Date March 30, 2017, 10:50 a.m.
Message ID <9f25299c45b39fbdfc34.1490871033@devbig314.prn1.facebook.com>
Download mbox | patch
Permalink /patch/19846/
State Accepted
Headers show

Comments

Ryan McElroy - March 30, 2017, 10:50 a.m.
# HG changeset patch
# User Ryan McElroy <rmcelroy@fb.com>
# Date 1490871010 25200
#      Thu Mar 30 03:50:10 2017 -0700
# Node ID 9f25299c45b39fbdfc34c0c3ef1c454bcd42ed02
# Parent  2632df096fc0ac7582382b1f94ea4b9ad0bce8f2
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.
Yuya Nishihara - April 2, 2017, 4:17 a.m.
On Thu, 30 Mar 2017 03:50:33 -0700, Ryan McElroy wrote:
> # HG changeset patch
> # User Ryan McElroy <rmcelroy@fb.com>
> # Date 1490871010 25200
> #      Thu Mar 30 03:50:10 2017 -0700
> # Node ID 9f25299c45b39fbdfc34c0c3ef1c454bcd42ed02
> # Parent  2632df096fc0ac7582382b1f94ea4b9ad0bce8f2
> rebase: move destination test to new test file

Looks good. Queued the series, thanks.

Patch

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)
+