Patchwork [2,of,5,stable,bid] tests: better test coverage for bid merge

login
register
mail settings
Submitter Mads Kiilerich
Date April 22, 2014, 12:24 a.m.
Message ID <cced6ee777ace47d5613.1398126257@localhost.localdomain>
Download mbox | patch
Permalink /patch/4415/
State Accepted
Commit b743077db69a88956a9136608358819337c5fb52
Headers show

Comments

Mads Kiilerich - April 22, 2014, 12:24 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1398104322 -7200
#      Mon Apr 21 20:18:42 2014 +0200
# Branch stable
# Node ID cced6ee777ace47d56139976333df039c4af913a
# Parent  40a0fe8ec313c9cbf903d31a7832d9d24d9c09c7
tests: better test coverage for bid merge

Martin Geislers test case revealed the previous message argument error.

Patch

diff --git a/tests/test-merge-criss-cross.t b/tests/test-merge-criss-cross.t
--- a/tests/test-merge-criss-cross.t
+++ b/tests/test-merge-criss-cross.t
@@ -265,3 +265,78 @@  Verify how the output looks and and how 
   (branch merge, don't forget to commit)
 
   $ cd ..
+
+http://stackoverflow.com/questions/9350005/how-do-i-specify-a-merge-base-to-use-in-a-hg-merge/9430810
+
+  $ hg init ancestor-merging
+  $ cd ancestor-merging
+  $ echo a > x
+  $ hg commit -A -m a x
+  $ hg update -q 0
+  $ echo b >> x
+  $ hg commit -m b
+  $ hg update -q 0
+  $ echo c >> x
+  $ hg commit -qm c
+  $ hg update -q 1
+  $ hg merge -q --tool internal:local 2
+  $ echo c >> x
+  $ hg commit -m bc
+  $ hg update -q 2
+  $ hg merge -q --tool internal:local 1
+  $ echo b >> x
+  $ hg commit -qm cb
+
+  $ hg merge
+  note: using 70008a2163f6 as ancestor of 0d355fdef312 and 4b8b546a3eef
+        alternatively, use --config merge.preferancestor=b211bbc6eb3c
+  merging x
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ cat x
+  a
+  c
+  b
+  c
+
+  $ hg up -qC .
+
+  $ hg merge --config merge.preferancestor=b211bbc6eb3c
+  note: using b211bbc6eb3c as ancestor of 0d355fdef312 and 4b8b546a3eef
+        alternatively, use --config merge.preferancestor=70008a2163f6
+  merging x
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ cat x
+  a
+  b
+  c
+  b
+
+  $ hg up -qC .
+
+  $ hg merge -v --config merge.preferancestor="*"
+  
+  calculating bids for ancestor 70008a2163f6
+  resolving manifests
+  
+  calculating bids for ancestor b211bbc6eb3c
+  resolving manifests
+  
+  auction for merging merge bids
+   x: multiple merge bids:
+    x: m
+    x: m
+   x: ambiguous merge - picked m action)
+  end of auction
+  
+  merging x
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ cat x
+  a
+  c
+  b
+  c
+
+  $ cd ..