Patchwork [08,of,13] mergestate: document what mergestate._results is for

login
register
mail settings
Submitter Pulkit Goyal
Date July 17, 2020, 8:59 a.m.
Message ID <3e356397d1b4f0b07465.1594976369@workspace>
Download mbox | patch
Permalink /patch/46781/
State Accepted
Headers show

Comments

Pulkit Goyal - July 17, 2020, 8:59 a.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1594300418 -19800
#      Thu Jul 09 18:43:38 2020 +0530
# Node ID 3e356397d1b4f0b07465fab86045a38d59029067
# Parent  7265d8b575ff4f3adfc392247f868344eadd43c2
# EXP-Topic mergestate-refactor
mergestate: document what mergestate._results is for

Understanding that dict is important for understanding how mergestate is
performing operations on dirstate.

Differential Revision: https://phab.mercurial-scm.org/D8739

Patch

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -267,6 +267,11 @@  class mergestate(object):
                 self._labels = [l for l in labels if len(l) > 0]
             elif not rtype.islower():
                 unsupported.add(rtype)
+        # contains a mapping of form:
+        # {filename : (merge_return_value, action_to_be_performed}
+        # these are results of re-running merge process
+        # this dict is used to perform actions on dirstate caused by re-running
+        # the merge
         self._results = {}
         self._dirty = False