[Updated] D12145: simplemerge: convert MergeInput to regular, non-attr.ib class

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Feb 11 02:55:20 UTC 2022


martinvonz edited the summary of this revision.
martinvonz updated this revision to Diff 32133.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12145?vs=32094&id=32133

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12145/new/

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

AFFECTED FILES
  mercurial/simplemerge.py

CHANGE DETAILS

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,
@@ -474,14 +473,14 @@
     return lines
 
 
- at 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 simplemerge(



To: martinvonz, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220211/35c6aa78/attachment-0002.html>


More information about the Mercurial-patches mailing list