D2435: commitextras: fix on Python 3 by using sysstrs for __dict__ ops

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Mon Feb 26 03:49:04 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm dubious of the __dict__ shenanigans in use here, but lack the
  enthusiasm for figuring out why that was done right now.
  
  1. skip-blame just some r prefixes

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/commitextras.py

CHANGE DETAILS

diff --git a/hgext/commitextras.py b/hgext/commitextras.py
--- a/hgext/commitextras.py
+++ b/hgext/commitextras.py
@@ -70,7 +70,7 @@
 
         # This __dict__ logic is needed because the normal
         # extension.wrapfunction doesn't seem to work.
-        repo.__dict__['commit'] = _wrappedcommit
+        repo.__dict__[r'commit'] = _wrappedcommit
         return orig(ui, repo, *pats, **opts)
     finally:
-        del repo.__dict__['commit']
+        del repo.__dict__[r'commit']



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


More information about the Mercurial-devel mailing list