Patchwork D7284: mdiff: mark diffopts as having dynamic attributes

login
register
mail settings
Submitter phabricator
Date Nov. 7, 2019, 8:34 a.m.
Message ID <c2fb59e76f0046429620dae6b0f16bd9@localhost.localdomain>
Download mbox | patch
Permalink /patch/42879/
State Not Applicable
Headers show

Comments

phabricator - Nov. 7, 2019, 8:34 a.m.
Closed by commit rHGf2f460cdb4f5: mdiff: mark diffopts as having dynamic attributes (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7284?vs=17654&id=17698

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

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

AFFECTED FILES
  mercurial/mdiff.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py
--- a/mercurial/mdiff.py
+++ b/mercurial/mdiff.py
@@ -38,6 +38,7 @@ 
 splitnewlines = bdiff.splitnewlines
 
 
+# TODO: this looks like it could be an attrs, which might help pytype
 class diffopts(object):
     '''context is the number of context lines
     text treats all files as text
@@ -52,6 +53,8 @@ 
     upgrade generates git diffs to avoid data loss
     '''
 
+    _HAS_DYNAMIC_ATTRIBUTES = True
+
     defaults = {
         b'context': 3,
         b'text': False,