Patchwork [2,of,5] commands.debugmergestate: print out branch merge info

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 3, 2015, 6:23 a.m.
Message ID <2756d2b5471bdf69b77e.1446531811@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11268/
State Changes Requested
Headers show

Comments

Siddharth Agarwal - Nov. 3, 2015, 6:23 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1446519494 28800
#      Mon Nov 02 18:58:14 2015 -0800
# Node ID 2756d2b5471bdf69b77e8b268afc9c24cd68f224
# Parent  10ea1863762987b74bc6431d72e8c1b160ff3499
commands.debugmergestate: print out branch merge info

We're going to serialize this information in upcoming patches.
Martin von Zweigbergk - Nov. 4, 2015, 12:20 a.m.
On Mon, Nov 2, 2015 at 10:24 PM Siddharth Agarwal <sid0@fb.com> wrote:

> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1446519494 28800
> #      Mon Nov 02 18:58:14 2015 -0800
> # Node ID 2756d2b5471bdf69b77e8b268afc9c24cd68f224
> # Parent  10ea1863762987b74bc6431d72e8c1b160ff3499
> commands.debugmergestate: print out branch merge info
>

If I understand correctly from the description of patch 4/5, the branch
merge info is not yet stored, which makes this patch very confusing to me.
Could we just squash it into 4/5?



>
> We're going to serialize this information in upcoming patches.
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -2535,6 +2535,8 @@ def debugmergestate(ui, repo, *args):
>                  ui.write(('local: %s\n') % record)
>              elif rtype == 'O':
>                  ui.write(('other: %s\n') % record)
> +            elif rtype == 'b':
> +                ui.write(('branch merge: %s\n') % bool(int(record)))
>              elif rtype == 'm':
>                  driver, mdstate = record.split('\0', 1)
>                  ui.write(('merge driver: %s (state "%s")\n')
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2535,6 +2535,8 @@  def debugmergestate(ui, repo, *args):
                 ui.write(('local: %s\n') % record)
             elif rtype == 'O':
                 ui.write(('other: %s\n') % record)
+            elif rtype == 'b':
+                ui.write(('branch merge: %s\n') % bool(int(record)))
             elif rtype == 'm':
                 driver, mdstate = record.split('\0', 1)
                 ui.write(('merge driver: %s (state "%s")\n')