# HG changeset patch # User Renato Cunha # Date 2010-07-15 01:58:29 # Node ID 9bbfeba33aa38ec30924af29928135881e05a455 # Parent cd6884231db8affc19e2f8107fd8c65ef60709f3 record: removed 'has_key' usage Py3k has removed the dictionary has_key method. This patch implements a one argument function that can be used as a callback by hg.revert in the record extension. diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -486,7 +486,8 @@ def dorecord(ui, repo, commitfunc, *pats # 3a. apply filtered patch to clean repo (clean) if backups: - hg.revert(repo, repo.dirstate.parents()[0], backups.has_key) + hg.revert(repo, repo.dirstate.parents()[0], + lambda key: key in backups) # 3b. (apply) if dopatch: