diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py --- a/hgext/convert/gnuarch.py +++ b/hgext/convert/gnuarch.py @@ -284,7 +284,7 @@ class gnuarch_source(converter_source, c self.changes[rev].summary = self.recode(self.changes[rev].summary) # Commit revision origin when dealing with a branch or tag - if catlog.has_key('Continuation-of'): + if 'Continuation-of' in catlog: self.changes[rev].continuationof = self.recode(catlog['Continuation-of']) except Exception: raise util.Abort(_('could not parse cat-log of %s') % rev) diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py --- a/hgext/win32mbcs.py +++ b/hgext/win32mbcs.py @@ -101,7 +101,7 @@ def wrapperforlistdir(func, args, kwds): if args: args = list(args) args[0] = appendsep(args[0]) - if kwds.has_key('path'): + if 'path' in kwds: kwds['path'] = appendsep(kwds['path']) return func(*args, **kwds) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1323,11 +1323,11 @@ def grep(ui, repo, pattern, *pats, **opt continue files.append(fn) - if not matches[rev].has_key(fn): + if fn not in matches[rev]: grepbody(fn, rev, flog.read(fnode)) pfn = copy or fn - if not matches[parent].has_key(pfn): + if pfn not in matches[parent]: try: fnode = pctx.filenode(pfn) grepbody(pfn, parent, flog.read(fnode))