Patchwork [3,of,4,mergedriver] test-merge-changedelete.t: print out debugmergestate

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 30, 2015, 10:25 p.m.
Message ID <e4745330dbb979cc776c.1448922308@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11687/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 30, 2015, 10:25 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1448490406 28800
#      Wed Nov 25 14:26:46 2015 -0800
# Node ID e4745330dbb979cc776cf909c4355425f145ebaa
# Parent  57d729187655e7434b9642017b838fd86e664a21
# Available At http://42.netv6.net/sid0-wip/hg/
#              hg pull http://42.netv6.net/sid0-wip/hg/ -r e4745330dbb9
test-merge-changedelete.t: print out debugmergestate

Also print out nullhex more nicely.

We're going to use this to verify the merge state in upcoming patches.
Siddharth Agarwal - Nov. 30, 2015, 10:29 p.m.
On 11/30/15 14:25, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1448490406 28800
> #      Wed Nov 25 14:26:46 2015 -0800
> # Node ID e4745330dbb979cc776cf909c4355425f145ebaa
> # Parent  57d729187655e7434b9642017b838fd86e664a21
> # Available At http://42.netv6.net/sid0-wip/hg/
> #              hg pull http://42.netv6.net/sid0-wip/hg/ -r e4745330dbb9
> test-merge-changedelete.t: print out debugmergestate
>
> Also print out nullhex more nicely.

This line shouldn't be in this patch -- I split this out into a separate 
patch earlier in the series. If you could drop this line in flight I'd 
appreciate it.

>
> We're going to use this to verify the merge state in upcoming patches.
>
> diff --git a/tests/test-merge-changedelete.t b/tests/test-merge-changedelete.t
> --- a/tests/test-merge-changedelete.t
> +++ b/tests/test-merge-changedelete.t
> @@ -13,6 +13,8 @@ Make sure HGMERGE doesn't interfere with
>     >     hg st -A file1 file2 file3
>     >     echo "--- resolve --list ---"
>     >     hg resolve --list file1 file2 file3
> +  >     echo "--- debugmergestate ---"
> +  >     hg debugmergestate
>     >     for file in file1 file2 file3; do
>     >         if [ -f $file ]; then
>     >             echo "--- $file ---"
> @@ -68,6 +70,14 @@ Non-interactive merge:
>     C file1
>     --- resolve --list ---
>     U file3
> +  --- debugmergestate ---
> +  * version 2 records
> +  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
> +  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
> +  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
> +    local path: file3 (flags "")
> +    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
> +    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
>     --- file1 ---
>     1
>     changed
> @@ -109,6 +119,14 @@ Interactive merge:
>     C file1
>     --- resolve --list ---
>     U file3
> +  --- debugmergestate ---
> +  * version 2 records
> +  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
> +  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
> +  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
> +    local path: file3 (flags "")
> +    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
> +    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
>     --- file1 ---
>     1
>     changed
> @@ -160,6 +178,14 @@ Interactive merge with bad input:
>     R file1
>     --- resolve --list ---
>     U file3
> +  --- debugmergestate ---
> +  * version 2 records
> +  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
> +  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
> +  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
> +    local path: file3 (flags "")
> +    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
> +    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
>     *** file1 does not exist
>     --- file2 ---
>     2
> @@ -193,6 +219,8 @@ Interactive merge with not enough input:
>     C file1
>     C file3
>     --- resolve --list ---
> +  --- debugmergestate ---
> +  no merge state found
>     --- file1 ---
>     1
>     changed
> @@ -219,6 +247,8 @@ Non-interactive linear update
>     C file2
>     C file3
>     --- resolve --list ---
> +  --- debugmergestate ---
> +  no merge state found
>     --- file1 ---
>     1
>     changed
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
Martin von Zweigbergk - Nov. 30, 2015, 10:33 p.m.
On Mon, Nov 30, 2015 at 2:27 PM Siddharth Agarwal <sid0@fb.com> wrote:

> Also print out nullhex more nicely.


Moved to a separate patch, right?
Siddharth Agarwal - Nov. 30, 2015, 10:48 p.m.
On 11/30/15 14:33, Martin von Zweigbergk wrote:
>
>
> On Mon, Nov 30, 2015 at 2:27 PM Siddharth Agarwal <sid0@fb.com 
> <mailto:sid0@fb.com>> wrote:
>
>     Also print out nullhex more nicely.
>
>
> Moved to a separate patch, right?

Yeah.

>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-merge-changedelete.t b/tests/test-merge-changedelete.t
--- a/tests/test-merge-changedelete.t
+++ b/tests/test-merge-changedelete.t
@@ -13,6 +13,8 @@  Make sure HGMERGE doesn't interfere with
   >     hg st -A file1 file2 file3
   >     echo "--- resolve --list ---"
   >     hg resolve --list file1 file2 file3
+  >     echo "--- debugmergestate ---"
+  >     hg debugmergestate
   >     for file in file1 file2 file3; do
   >         if [ -f $file ]; then
   >             echo "--- $file ---"
@@ -68,6 +70,14 @@  Non-interactive merge:
   C file1
   --- resolve --list ---
   U file3
+  --- debugmergestate ---
+  * version 2 records
+  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
+  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
+  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
+    local path: file3 (flags "")
+    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
+    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
   --- file1 ---
   1
   changed
@@ -109,6 +119,14 @@  Interactive merge:
   C file1
   --- resolve --list ---
   U file3
+  --- debugmergestate ---
+  * version 2 records
+  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
+  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
+  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
+    local path: file3 (flags "")
+    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
+    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
   --- file1 ---
   1
   changed
@@ -160,6 +178,14 @@  Interactive merge with bad input:
   R file1
   --- resolve --list ---
   U file3
+  --- debugmergestate ---
+  * version 2 records
+  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
+  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
+  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
+    local path: file3 (flags "")
+    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
+    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
   *** file1 does not exist
   --- file2 ---
   2
@@ -193,6 +219,8 @@  Interactive merge with not enough input:
   C file1
   C file3
   --- resolve --list ---
+  --- debugmergestate ---
+  no merge state found
   --- file1 ---
   1
   changed
@@ -219,6 +247,8 @@  Non-interactive linear update
   C file2
   C file3
   --- resolve --list ---
+  --- debugmergestate ---
+  no merge state found
   --- file1 ---
   1
   changed