# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2017-05-03 19:14:53 # Node ID 89153b0d4881d89adeddf3f0340bb114f796ed93 # Parent 09fb3d3b1b3a33fea159d5037cfa3e611d3706a1 py3: make adefaults keys str to be compatible with getattr getattr passes a str value of the attribute to be looked and keys in adefaults dict are bytes which resulted in AttributeError. This patch abuses r'' to make the keys str. diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -479,7 +479,8 @@ class cmdalias(object): return aliasargs(self.fn, args) def __getattr__(self, name): - adefaults = {'norepo': True, 'optionalrepo': False, 'inferrepo': False} + adefaults = {r'norepo': True, + r'optionalrepo': False, r'inferrepo': False} if name not in adefaults: raise AttributeError(name) if self.badalias or util.safehasattr(self, 'shell'):