diff tests/test-unstable.t @ 3593:b92114f201c9 mercurial-4.1

test-compat: merge mercurial-4.2 into mercurial-4.1
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 21 Mar 2018 16:35:18 +0100
parents 98941c28f3e2
children
line wrap: on
line diff
--- a/tests/test-unstable.t	Wed Mar 21 16:32:54 2018 +0100
+++ b/tests/test-unstable.t	Wed Mar 21 16:35:18 2018 +0100
@@ -68,6 +68,153 @@
   $ cd ..
 
 ===============================================================================
+Test instability resolution for a merge changeset unstable because one
+of its parent is obsolete
+Not supported yet
+==============================================================================
+
+  $ hg init test2
+  $ cd test2
+  $ mkcommit base
+  $ mkcommits _a
+  $ hg up "desc(base)"
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit _c
+  created new head
+  $ hg merge "desc(_a)" >/dev/null
+  $ hg commit -m "merge"
+  $ hg up "desc(_a)"
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg amend -m "aprime"
+  1 new unstable changesets
+  $ hg log -G
+  @  4:47127ea62e5f@default(draft) aprime
+  |
+  | o    3:6b4280e33286@default(draft) merge
+  | |\
+  +---o  2:474da87dd33b@default(draft) add _c
+  | |
+  | x  1:b3264cec9506@default(draft) add _a
+  |/
+  o  0:b4952fcf48cf@default(draft) add base
+  
+
+  $ hg evo --all --any --orphan
+  move:[3] merge
+  atop:[4] aprime
+  working directory is now at 0bf3f3a59c8c
+  $ hg log -G
+  @    5:0bf3f3a59c8c@default(draft) merge
+  |\
+  | o  4:47127ea62e5f@default(draft) aprime
+  | |
+  o |  2:474da87dd33b@default(draft) add _c
+  |/
+  o  0:b4952fcf48cf@default(draft) add base
+  
+
+  $ cd ..
+
+===============================================================================
+Test instability resolution for a merge changeset unstable because both
+of its parent are obsolete
+Not supported yet
+==============================================================================
+
+  $ hg init test3
+  $ cd test3
+  $ mkcommit base
+  $ mkcommits _a
+  $ hg up "desc(base)"
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit _c
+  created new head
+  $ hg merge "desc(_a)" >/dev/null
+  $ hg commit -m "merge"
+  $ hg up "desc(_a)"
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg amend -m "aprime"
+  1 new unstable changesets
+  $ hg up "desc(_c)"
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg amend -m "cprime"
+  $ hg log -G
+  @  5:2db39fda7e2f@default(draft) cprime
+  |
+  | o  4:47127ea62e5f@default(draft) aprime
+  |/
+  | o    3:6b4280e33286@default(draft) merge
+  | |\
+  +---x  2:474da87dd33b@default(draft) add _c
+  | |
+  | x  1:b3264cec9506@default(draft) add _a
+  |/
+  o  0:b4952fcf48cf@default(draft) add base
+  
+
+  $ hg evo --all --any --orphan
+  move:[3] merge
+  atop:[4] aprime
+  move:[6] merge
+  atop:[5] cprime
+  working directory is now at 2d30b910830b
+  $ hg log -G
+  @    7:2d30b910830b@default(draft) merge
+  |\
+  | o  5:2db39fda7e2f@default(draft) cprime
+  | |
+  o |  4:47127ea62e5f@default(draft) aprime
+  |/
+  o  0:b4952fcf48cf@default(draft) add base
+  
+
+  $ cd ..
+
+===============================================================================
+Test instability resolution for a changeset unstable because its parent
+is obsolete with multiple successors all in one chain (simple split)
+==============================================================================
+
+  $ hg init test4
+  $ cd test4
+  $ mkcommits _a _b _c
+  $ hg up "desc(_a)"
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommits bprimesplit1 bprimesplit2
+  created new head
+  $ hg prune "desc(_b)" -s "desc(bprimesplit1) + desc(bprimesplit2)" --split
+  1 changesets pruned
+  1 new unstable changesets
+  $ hg log -G
+  @  4:2a4ccc0bb20c@default(draft) add bprimesplit2
+  |
+  o  3:8b87864bd0f4@default(draft) add bprimesplit1
+  |
+  | o  2:102002290587@default(draft) add _c
+  | |
+  | x  1:37445b16603b@default(draft) add _b
+  |/
+  o  0:135f39f4bd78@default(draft) add _a
+  
+
+  $ hg evo --all --any --orphan
+  move:[2] add _c
+  atop:[4] add bprimesplit2
+  working directory is now at 387cc1e837d7
+  $ hg log -G
+  @  5:387cc1e837d7@default(draft) add _c
+  |
+  o  4:2a4ccc0bb20c@default(draft) add bprimesplit2
+  |
+  o  3:8b87864bd0f4@default(draft) add bprimesplit1
+  |
+  o  0:135f39f4bd78@default(draft) add _a
+  
+
+
+  $ cd ..
+
+===============================================================================
 Test instability resolution for a changeset unstable because its parent
 is obsolete with multiple successors on one branches but in reverse
 order (cross-split).
@@ -118,4 +265,55 @@
   o  0:135f39f4bd78@default(draft) add _a
   
 
+
   $ cd ..
+
+===============================================================================
+Test instability resolution for a changeset unstable because its parent
+is obsolete with multiple successors on two branches.
+Not supported yet
+==============================================================================
+
+  $ hg init test6
+  $ cd test6
+  $ mkcommits _a _b _c
+  $ hg up "desc(_a)"
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit bprimesplit1
+  created new head
+  $ hg up "desc(_a)"
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit bprimesplit2
+  created new head
+  $ hg prune "desc(_b)" -s "desc(bprimesplit1) + desc(bprimesplit2)" --split
+  1 changesets pruned
+  1 new unstable changesets
+  $ hg log -G
+  @  4:3c69ea6aa93e@default(draft) add bprimesplit2
+  |
+  | o  3:8b87864bd0f4@default(draft) add bprimesplit1
+  |/
+  | o  2:102002290587@default(draft) add _c
+  | |
+  | x  1:37445b16603b@default(draft) add _b
+  |/
+  o  0:135f39f4bd78@default(draft) add _a
+  
+
+  $ hg evo --all --any --orphan
+  could not solve instability, ambiguous destination: parent split across two branches
+  $ hg log -G
+  @  4:3c69ea6aa93e@default(draft) add bprimesplit2
+  |
+  | o  3:8b87864bd0f4@default(draft) add bprimesplit1
+  |/
+  | o  2:102002290587@default(draft) add _c
+  | |
+  | x  1:37445b16603b@default(draft) add _b
+  |/
+  o  0:135f39f4bd78@default(draft) add _a
+  
+
+
+  $ cd ..
+