# HG changeset patch # User Renato Cunha # Date 1279159109 10800 # 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 -r cd6884231db8 -r 9bbfeba33aa3 hgext/record.py --- a/hgext/record.py Wed Jul 14 21:30:50 2010 +0200 +++ b/hgext/record.py Wed Jul 14 22:58:29 2010 -0300 @@ -486,7 +486,8 @@ # 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: