Patchwork test-rebase: add another test for rebase with multiple roots

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 22, 2013, 10:22 a.m.
Message ID <e5d7a2e073d74249224d.1358850123@crater1.logilab.fr>
Download mbox | patch
Permalink /patch/709/
State Accepted
Commit 37100f30590f28a33479e88b57c655a462493f70
Headers show

Comments

Pierre-Yves David - Jan. 22, 2013, 10:22 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1358564896 -3600
# Branch stable
# Node ID e5d7a2e073d74249224d6765b7ca432c5fbd08ef
# Parent  8a811fa9a9c0785b843e032ed82ce5316a645631
test-rebase: add another test for rebase with multiple roots

This test the case when a Merge is dropped.
Matt Mackall - Jan. 23, 2013, 10:25 p.m.
On Tue, 2013-01-22 at 11:22 +0100, pierre-yves.david@logilab.fr wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1358564896 -3600
> # Branch stable
> # Node ID e5d7a2e073d74249224d6765b7ca432c5fbd08ef
> # Parent  8a811fa9a9c0785b843e032ed82ce5316a645631
> test-rebase: add another test for rebase with multiple roots

Queued for stable, thanks.

Patch

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
@@ -383,5 +383,76 @@  Test multiple root handling
   o |  4:9520eea781bc E
   |/
   o  0:cd010b8cd998 A
   
   $ cd ..
+
+test on rebase dropping a merge
+
+(setup)
+
+  $ hg init dropmerge
+  $ cd dropmerge
+  $ hg unbundle "$TESTDIR/bundles/rebase.hg"
+  adding changesets
+  adding manifests
+  adding file changes
+  added 8 changesets with 7 changes to 7 files (+2 heads)
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  $ hg up 3
+  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg merge 7
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg ci -m 'M'
+  $ echo I > I
+  $ hg add I
+  $ hg ci -m I
+  $ hg log -G
+  @  9:4bde274eefcf I
+  |
+  o    8:53a6a128b2b7 M
+  |\
+  | o  7:02de42196ebe H
+  | |
+  | | o  6:eea13746799a G
+  | |/|
+  | o |  5:24b6387c8c8c F
+  | | |
+  | | o  4:9520eea781bc E
+  | |/
+  o |  3:32af7686d403 D
+  | |
+  o |  2:5fddd98957c8 C
+  | |
+  o |  1:42ccdea3bb16 B
+  |/
+  o  0:cd010b8cd998 A
+  
+(actual test)
+
+  $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)'
+  $ hg log -G
+  @  12:acd174b7ab39 I
+  |
+  o  11:6c11a6218c97 H
+  |
+  | o  10:b5313c85b22e D
+  |/
+  | o    8:53a6a128b2b7 M
+  | |\
+  | | x  7:02de42196ebe H
+  | | |
+  o---+  6:eea13746799a G
+  | | |
+  | | o  5:24b6387c8c8c F
+  | | |
+  o---+  4:9520eea781bc E
+   / /
+  x |  3:32af7686d403 D
+  | |
+  o |  2:5fddd98957c8 C
+  | |
+  o |  1:42ccdea3bb16 B
+  |/
+  o  0:cd010b8cd998 A
+