Patchwork merge: check for conflicting actions irrespective of length of bids

login
register
mail settings
Submitter Pulkit Goyal
Date Oct. 2, 2020, 1:42 p.m.
Message ID <57c951dae51f16f774d4.1601646172@workspace>
Download mbox | patch
Permalink /patch/47367/
State Accepted
Headers show

Comments

Pulkit Goyal - Oct. 2, 2020, 1:42 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1601644239 -19800
#      Fri Oct 02 18:40:39 2020 +0530
# Node ID 57c951dae51f16f774d4d3e0a41ae1c4b44ad38c
# Parent  e8078af6af3004f7abe94bc6e832bd688df11432
# EXP-Topic merge-newnode-final
merge: check for conflicting actions irrespective of length of bids

We should for whether bids contain a combination of actions which conflict with
each other. Since right now we only have couple of such combination, and
combinations also consist of two actions, we were checking for them only when
length of bids is 2. Let's check that irrespective of the length of bids.
Yuya Nishihara - Oct. 3, 2020, 2:10 a.m.
On Fri, 02 Oct 2020 19:12:52 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1601644239 -19800
> #      Fri Oct 02 18:40:39 2020 +0530
> # Node ID 57c951dae51f16f774d4d3e0a41ae1c4b44ad38c
> # Parent  e8078af6af3004f7abe94bc6e832bd688df11432
> # EXP-Topic merge-newnode-final
> merge: check for conflicting actions irrespective of length of bids

Queued, thanks.

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1223,7 +1223,6 @@  def calculateupdates(
             if (
                 mergestatemod.ACTION_CHANGED_DELETED in bids
                 and mergestatemod.ACTION_KEEP_NEW in bids
-                and len(bids) == 2
             ):
                 repo.ui.note(_(b" %s: picking 'changed/deleted' action\n") % f)
                 mresult.addfile(
@@ -1243,7 +1242,6 @@  def calculateupdates(
             if (
                 mergestatemod.ACTION_DELETED_CHANGED in bids
                 and mergestatemod.ACTION_GET in bids
-                and len(bids) == 2
             ):
                 repo.ui.note(_(b" %s: picking 'delete/changed' action\n") % f)
                 mresult.addfile(