Patchwork [1,of,2,v2] tests: coverage of ancestry with convert in multiple non-overlapping steps

login
register
mail settings
Submitter Mads Kiilerich
Date April 12, 2016, 10:18 p.m.
Message ID <637869e31c974eecea10.1460499486@madski>
Download mbox | patch
Permalink /patch/14567/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Mads Kiilerich - April 12, 2016, 10:18 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1458860467 25200
#      Thu Mar 24 16:01:07 2016 -0700
# Node ID 637869e31c974eecea10853fadac216107c434e1
# Parent  16255662446d2ce08bd0a4210df30afe3d6377f6
tests: coverage of ancestry with convert in multiple non-overlapping steps

This exposes that parent information is lost in cases where it is possible to
preserve it - and where it thus would make sense if that was what happened.

Patch

diff --git a/tests/test-convert-hg-startrev.t b/tests/test-convert-hg-startrev.t
--- a/tests/test-convert-hg-startrev.t
+++ b/tests/test-convert-hg-startrev.t
@@ -221,3 +221,25 @@  Convert from specified revs
   |/
   o  0 "0: add a b f" files: a b f
   
+Convert in multiple steps that doesn't overlap - the link to the parent is
+currently missing
+
+  $ hg convert --config convert.hg.revs=::1 source multistep
+  initializing destination multistep repository
+  scanning source...
+  sorting...
+  converting...
+  1 0: add a b f
+  0 1: add c, move f to d
+  $ hg convert --config convert.hg.revs=2 source multistep
+  scanning source...
+  sorting...
+  converting...
+  0 2: copy e from a, change b
+  $ glog multistep
+  o  2 "2: copy e from a, change b" files: a b c d e
+  
+  o  1 "1: add c, move f to d" files: c d f
+  |
+  o  0 "0: add a b f" files: a b f
+