Patchwork D12145: simplemerge: convert MergeInput to regular, non-attr.ib class

login
register
mail settings
Submitter phabricator
Date Feb. 8, 2022, 9:27 p.m.
Message ID <differential-rev-PHID-DREV-qyvi55cupia6auawlhmj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50480/
State New
Headers show

Comments

phabricator - Feb. 8, 2022, 9:27 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12145

AFFECTED FILES
  mercurial/simplemerge.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/simplemerge.py b/mercurial/simplemerge.py
--- a/mercurial/simplemerge.py
+++ b/mercurial/simplemerge.py
@@ -19,7 +19,6 @@ 
 from __future__ import absolute_import
 
 from .i18n import _
-from .thirdparty import attr
 from . import (
     error,
     mdiff,
@@ -462,14 +461,14 @@ 
     return lines
 
 
-@attr.s
 class MergeInput(object):
-    fctx = attr.ib()
-    label = attr.ib(default=None)
-    # If the "detail" part is set, then that is rendered after the label and
-    # separated by a ':'. The label is padded to make the ':' aligned among all
-    # merge inputs.
-    label_detail = attr.ib(default=None)
+    def __init__(self, fctx, label=None, label_detail=None):
+        self.fctx = fctx
+        self.label = label
+        # If the "detail" part is set, then that is rendered after the label and
+        # separated by a ':'. The label is padded to make the ':' aligned among
+        # all merge inputs.
+        self.label_detail = label_detail
 
     def _verifytext(self, ui, opts):
         """verifies that text is non-binary (unless opts[text] is passed,