Patchwork [1,of,2] tests: demonstrate broken rebase from obsolete commit

login
register
mail settings
Submitter via Mercurial-devel
Date March 11, 2017, 1:15 a.m.
Message ID <460068415dc97223cce1.1489194951@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/19092/
State Superseded
Headers show

Comments

via Mercurial-devel - March 11, 2017, 1:15 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1485969524 28800
#      Wed Feb 01 09:18:44 2017 -0800
# Node ID 460068415dc97223cce156c70f7f8a6b659c4dd2
# Parent  5a31565161fb65056f9a062ec3d8fa81e1646328
tests: demonstrate broken rebase from obsolete commit

This shows the bug I reported in issue 5219.

Patch

diff -r 5a31565161fb -r 460068415dc9 tests/test-rebase-obsolete.t
--- a/tests/test-rebase-obsolete.t	Wed Mar 01 16:19:41 2017 -0800
+++ b/tests/test-rebase-obsolete.t	Wed Feb 01 09:18:44 2017 -0800
@@ -175,7 +175,7 @@ 
   32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (*) {'user': 'test'} (glob)
 
 
-More complex case were part of the rebase set were already rebased
+More complex case where part of the rebase set were already rebased
 
   $ hg rebase --rev 'desc(D)' --dest 'desc(H)'
   rebasing 9:08483444fef9 "D"
@@ -272,6 +272,17 @@ 
   D
   
   
+Start rebase from a commit that is obsolete but not hidden only because it's
+a working copy parent. We should be moved back to the starting commit as usual
+even though it is hidden (until we're moved there).
+
+  $ hg --hidden up -qr 'first(hidden())'
+  $ hg rebase --rev 13 --dest 15
+  rebasing 13:98f6af4ee953 "C"
+  abort: hidden revision '1'!
+  (use --hidden to access hidden revisions)
+  [255]
+
   $ cd ..
 
 collapse rebase